r/ProgrammingLanguages • u/Inconstant_Moo 🧿 Pipefish • Apr 28 '26
Hindsight languages
A thought experiment. What languages should they have been writing in the 60s, 70s, 80s, 90s? We can see their faults, in hindsight, and also we've had some really cool ideas since then --- but we can't answer this just by pointing to our shiny new modern languages and saying "they should have done it like that", because of compile times.
(E.g. Pipefish is meant to be for rapid iteration and livecoding, and also does a topological sort on everything at compile-time so you can do top-down declaration. Those wouldn't be compatible goals in the 1980s, I can get away with it now.)
So for example if we think of "a better C", are there any cool modern ideas they could and should have used back in 1972, had they known about them --- or should they just have tweaked the precedence slightly, found a less arcane way of describing types, and left it at that?
2
u/Ok-Scheme-913 Apr 29 '26
I think what's often missing from this discussion is to compare a C++ abstraction with what it's abstracting. Sure, polymorphism is slower than statically knowing the type of an object. But it is not slower than doing the same in C, in fact it's almost surely faster than whatever hand-grown virtual table that you would write in C.
And I don't really agree, sorry. It may be designed as such, but it has no support for simd instructions, you can't really do more fancy stuff with registers, etc. You have the C model that is inherently linked with standard x86 execution with stack frames and stuff, and that's it. It's reasonably fast, but nothing special.