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?
View all comments
Show parent comment
4
u/Inevitable-Ant1725 Apr 29 '26
I once embedded a kind of extension of prolog in scheme, where it's kind of easy because continuations can give you amb, and then fancier backtracking... And with some macros you can get something like lambda with extra clauses (I even had assert and retract) and variables that revert values on backtracking (and I did end up with logical variables and a full unification implementation, minus the occurs check).
In scheme you can mix backtracking with regular imperative code easily because it's all built in with continuations and you don't need some kind of awful code walker.
Sad to say I lost that code years ago, but's it's the work of maybe two weeks of work.