Here’s a talk, a quite long and wordy talk,
The Root of the Root of All Evil (youtube)
which bears the subtitle
A Brief History of Programming’s Most Ambiguous Catchphrase
and which has many interesting things to say about historical software technique.
There’s a companion blog post with lots of links:
It’s all about the quotable quip
premature optimization is the root of all evil
which, we find, is embedded almost as an aside in a very interesting paper by Knuth
Structured Programming with go to Statements (41 pages)
and perhaps most important is the instruction that we look at the full sentence and the following one:
We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%
Inevitably and very informatively, a nearby topic also covered is Dijkstra’s work, which was unfortunately published as a letter to the editor:
go to statement considered harmful
but which had been submitted as a paper with the more prosaic title
A Case against the GO TO Statement.
Something became clear(er) to me: at that time, structured programmed was held to be a better idea (for clarity and therefore maintainabilily, for productivity) but what was desired as the output was the machine code one might have hand-crafted - for the critical sections of code, which are a tiny minority. The hand-crafted code would of course have branches or jumps - the question was, in the absence of what we now call optimising compilers, how to express that intent in the high level language.
From the paper, by Knuth and Floyd
Notes on avoiding “Go To” statements
During the last decade there has been a growing sentiment that the use of “go to” statements is undesirable, or actually harmful. This attitude is apparently inspired by the idea that programs expressed solely in terms of con-ventional iterative constructions (“for”, “while”, etc.) are more readable and more easily proved correct. In this note we will make a few exploratory observations about the use and disuse of go to statements…
Here’s Knuth, for the thumbnail:
