106 points · by mbrubeck · 15y ago · 9 comments
http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pd...
Among many other things, it explains how eliminating goto removes certain useful optimizations. In fact, I think it's hard even to think of some of the constructs that Knuth uses if you are only practiced in goto-less programming.
—Edsger Dijkstra
1. The program structure should reflect the problem structure as closely as possible
2. Thinking of every possible case ("enumeratively") is much less powerful than abstract reasoning
To me the second point is where the power of functional programming lies. You express ideas in relatively small units with no side effects that are easy to fully reason about. When you express things clearly it just feels right. Special casing is possible in most functional languages, but it usually feels like a kludge.
Another excellent essay is EWD831, "Why numbering should start at zero", which was something I felt was intuitive once I got used to it, but couldn't articulate clearly. Reading his essay was soothing in the same way as scratching an itch.
The essay is here:
Why numbering should start at zero - Edsger W. Dijkstra http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EW...
I should also point out that mathematicians don't number at zero unless there is some advantage (the default is to start at one), but more importantly, the preferred style in mathematical arguments is to avoiding fiddling with indices as much as possible (since it's so easy to mess something up working at such a low level of abstraction).
Two additional things are useful to note.
The first is that he didn't pick the title "Goto considered harmful", the editor did.
The other thing is that as the article says, many think he is simply an academic. There was a period of his career where he worked for Burroughs corporation (remember, they invented virtual memory before IBM, but nobody believed it until IBM did) and he and three or for others wrote a compiler. That compiler had, in its lifetime, a total of three or four bugs. So there was certainly a practical side to him as well.