3 ms·
I think we could have had some better safety, especially as we get into the later 1980s. We could have eliminated nil earlier. We could have had strings with va
by jerf 2y ago
I think we could have had some better safety, especially as we get into the later 1980s. We could have eliminated nil earlier. We could have had strings with variable-encoded length prefixes, rather than either NULL-terminated strings or strings with a hard-coded 1 byte or 2 bytes of length. Using a bit smarter type-based approach so that the code always knows what type things are would have been pretty useful.
You might conceivably be able to run something like Go, without concurrency (thus eliminating the runtime), starting around the early 1990s on high-end computers, and that would have been a really, really nice system compared to most other things at the time. I pick Go because of its relative simplicity. A variant of D or something would probably also work well.
A practical more-functional language could probably also have been provided, but some careful work would be necessary. Sum types have some details that we can easily just throw power at nowadays but would take a bit more thought back then to keep performance up enough; you may have to trade down on a few details. Linked lists were not as relatively catastrophic back then as they are on modern systems but they still involved an extra pointer on everything if nothing else, a language more strongly focused on arrays might be able to help.
But it's important not to underestimate the resource poverty of the time. Rust is out of the question. People complain about how slow it is today as it is. The executables modern Rust produces may have run well (with appropriate bittedness changes and such) but the compiler is hopelessly complicated for the 1980s. Nothing even remotely resembling it would have worked. Most modern languages have moved on and are too complicated to fit on machines of that era in any recognizable state.
Modern dynamic scripting languages only began coming online in the late 1990s. Such examples that existed in that space before then were incredibly slow; people pine for the capabilities of the Lisp machines but nobody is sitting here in 2024 pining for their performance characteristics.
I've kind of rewritten your question to be about the 1990s. I think that's because honestly, in the 1980s, no there probably isn't a huge advantage we could give them. Pecking around the edges, sure. Avoiding some things that only hindsight could show were some traps, sure. Commodore could have used some assistance with building a platform that could expand into the future better; for all the advantages that Amiga had over the IBM world, IBMs ultimately expanded into the computers we run today more smoothly than the Amiga could have. There's some tweaks to graphics hardware we could suggest, especially in light of how they were actually used versus the designers thought they would be. But it's not like we'd be going back there with amazing genius techniques for running on their systems that they couldn't have conceived of.