Hacker News new | ask | show | jobs
by qntty 2074 days ago
What modern language would Dijkstra approve of?
6 comments

This is a very difficult question. We know somewhat his preferences, because he worked on implementing ALGOL 60 [0][1], but unfortunately we are blocked by a bit of incommensurability; in that time, garbage collection was not something that could be taken for granted. As a result, what he might have built in our era is hard to imagine.

That said, he did have relatively nice things to say about Haskell [2] and preferred Haskell to Java:

> Finally, in the specific comparison of Haskell versus Java, Haskell, though not perfect, is of a quality that is several orders of magnitude higher than Java, which is a mess (and needed an extensive advertizing campaign and aggressive salesmanship for its commercial acceptance).

I imagine that he would have liked something structured, equational, declarative, and modular; he would have wanted to treat programs as mathematical objects, as he says in [2]. Beyond that, though, we'll never know. He left some predictions like [3] but they are vague.

[0] https://en.wikipedia.org/wiki/ALGOL_60

[1] https://www.cs.utexas.edu/users/EWD/MCReps/MR35.PDF

[2] https://www.cs.utexas.edu/users/EWD/transcriptions/OtherDocs...

[3] https://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/E...

He would probably form a completely different opinion, the world is nothing like what could be anticipated 30 years go.

The first languages and their compilers were strongly driven by hardware constraints, a kilobyte of memory costing an arm and a leg.

Imagine storing function names in memory to compile the program, it doesn't fit in 1 kB. Imagine storing the whole source code in memory for processing, it doesn't work when there is less than a 1 MB of memory available.

It's ridiculous today but it's real reasons why things were made global back then or why C/pascal split the code between a header and a source file.

There are so many languages available today that I'm sure there are plenty he would have approved of. For example, I think he might have appreciated Zig. If you read his work it's pretty easy to see his top priority is managing complexity and limiting surprise.
> his top priority is managing complexity and limiting surprise

Zig doesn't do either of those things. There are a fair amount of criticisms of the mental model of the author that I've seen voiced - some including security.

What's worse, the community surrounding Zig (in particular, the Discord community) operates more like a cult - any negative questioning gets you shunned.

I was personally a huge fan of Zig until a number of questionable design decisions and dismissed bug reports lead me to believe it will forever remain a toy language. I can't imagine Dijkstra approving.

That’s too bad. I was judging based on the overview of Zig that was recently posted here. I gladly defer to your more informed opinion on the subject, but I’ll maintain Dijkstra would have liked the design goal of executing the procedure as written absent fancy obfuscated control structures.

The cult-like attitude that many programmers have about languages certainly supports Dijkstra’s claims about the immaturity of the field.

I suspect, none of them. If he did approve of one, it would probably be Haskell.

And, for all his complaining, I don't know of any language that he authored. He's sure good at telling everyone that they're doing it wrong, though...

His rant-y EWDs seem to be the only ones people know. But his others go into much more detail about what he thinks and why. And while he didn't (to the best of my knowledge) directly create any language, he did implement an Algol 60 compiler and was involved in language design efforts throughout his life.

He helped create the ideas of Structured Programming, which most of us now take for granted, since pretty much every language in popular use these days are based on these ideas.

Dijkstra co-created a rather influential language called Algol 60[1]. It and its immediate descendants are still used in scholarly CS work because it's so good for clearly describing algorithms. Past that, the influence of Algol 60 on virtually all modern programming languages is hard to overstate.

[1] https://en.wikipedia.org/wiki/ALGOL_60

Well, he co-authored a compiler. From what your link says, he wasn't part of the committee that created the language.
StandardML
Whichever one grandparent commenter likes best.