4 ms·
Interesting as expected of Dijkstra. I found this part funny: > "That name ['programming languages'] was unfortunate because very soon the analogy with natural
by the_af 7y ago
Interesting as expected of Dijkstra. I found this part funny:
> "That name ['programming languages'] was unfortunate because very soon the analogy with natural languages became more misleading than illuminating. It strengthened the school of thought that tried to view programming primarily as a communication problem, it invited the psychologists in, who had nothing to contribute, and it seriously delayed the recognition of the benefits of viewing programs as formulae to be derived. It was the time of Edmund C. Berkeley’s “Giant Brains or Machines that Think”, it was the time of rampant anthropomorphism that would lead to the false hope of solving the programming problem by the verbosity of COBOL and would seduce Grace M. Hopper to write a paper titled “The Education of a Computer”. Regrettably and amazingly, the habit lingers on: it is quite easy to infuriate computing scientists by pointing out that anthropomorphizing inanimate objects is in science a symptom of professional immaturity."
This school of thought that Dijkstra decried is the one that eventually triumphed in our industry, and nowadays it is widely held that a general-purpose programming language "succeeds" primarily when it enables communication with/between programmers. Armies of consultants and bloggers and Uncle Bobs make a living out of this idea. The whole "languages are first for programmers to read, and second for computers to run" shtick.
I'm not sure which is my own position, but we do know which was Dijkstra's and that he would not be happy today.
- shmerl 7y agoComputers don't run languages though, they run code. And readability of the language for humans is a communication problem - there is no way around it. That's a different topic from using a language to communicate with the computer itself.
- the_af 7y agoAre you debating this with me or with Dijkstra? I didn't make up that aphorism myself. There is very much a design contradiction between "this language should make things easier for the computer (or compiler, or whatnot)" and "this language should be easy to read for humans, even if this makes it worse for the computer". This is widely acknowledged and not the point of contention; whether the former or the latter is more important is.
- shmerl 7y agoI was just commenting on your remark. I think Dijkstra was picking on the "language to communicate with computers" topic, not on language as a tool of communication between people. I mean, readability of any language for humans is an issue, but I'm not sure what readability for computers means exactly in this context. How easy it is to make an optimizing compiler? Modern languages use zero cost abstractions approach to improve readability for humans, while targeting well optimized code.
- the_af 7y agoVery possibly I misunderstand both you and Dijkstra. What else could he be referring to when he claims "[the name of 'programming languages'] invited the psychologists in, who had nothing to contribute, and it seriously delayed the recognition of the benefits of viewing programs as formulae to be derived."? The fact he specifically picks on COBOL -- exclusively formulated to communicate well to humans, not computers -- seems to favor my interpretation. I could be mistaken, of course. He does speak of "anthropomorphizing inanimate objects", which does favor your interpretation. Or maybe it's mixed?
- shmerl 7y agoMay be I misunderstood him, but his focus on "Giant Brains or Machines that Think" and “The Education of a Computer” sounds like the topic of languages as a tool of communication with computers. I didn't understand the focus as being better communication between programmers.
- the_af 7y agoHmm, I think you're right!
- 0815test 7y ago> This school of thought that Dijkstra decried is the one that eventually triumphed in our industry ... The whole "languages are first for programmers to read, and second for computers to run" shtick. If that was the case, I think we'd just end up using literate programming systems, which get both the "human-focused" and "computer" parts right. BTW, running executable code is only one small part of what computers do with programming languages; what about things like performing static analysis to detect errors within the code, and providing language-specific support for IDE's and/or CASE systems? These things just seem to be a lot more important in programming language design than either the "communicate to humans" or the "run executable code" part.
- the_af 7y agoI agree with you on all counts. I suppose I was thinking more of the Uncle Bob's and similar consultants' school of thought. If I dig deeper, it's not true that even this small subset has triumphed in the industry, either -- I know plenty of places where they don't even write tests. A few years ago, a software department in a major US-based oil company "discovered" unit testing and introduced it in a workshop as a big deal (note: they weren't practicing it, just talking about it, in its most bare-bones "hey, look this thing I found!" sort of way). In this context, literate programming is a pipe dream. I suppose I should amend my statement to: "this view has triumphed in the blogs, articles and papers that some programmers like to read, and self-styled gurus like to write, if not actually practice" :)
- AnimalMuppet 7y agoIt's incongruous that Dijkstra, in a paragraph decrying anthropomorphism, anthropomorphizes anthropomorphism (via saying that it seduced Hopper).
- Jtsummers 7y agoI saw that and suspected it was intended as humor on his part. That or he actually missed it when writing that letter.
- yters 7y agoComputers cannot program themselves, so makes sense to optimize computer languages for those who actually do the programming.
- User23 7y agoDijkstra was very much interested in keeping programs cognitively manageable. I can’t imagine he’d object to a program being readable. He’d see it as mathematical elegance. That said, for readers untrained in the predicate calculus, his work can be impenetrable. Fortunately anyone smart enough to program is smart enough to learn the predicate calculus. I use it regularly in real work. I don’t bother constructing fully formally correct programs, but I use invariants to write all but the most trivial loops.