5 ms·
Bray says "structured goto" like it's a bad thing. He should re-read Knuth's classic paper, "Structured Programming with Goto": http://pplab.snu.ac.kr/courses
by mbrubeck 17y ago
Bray says "structured goto" like it's a bad thing. He should re-read Knuth's classic paper, "Structured Programming with Goto":
http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pd...
This is the original source of the much-quoted "Premature optimization is the root of all evil." Unfortunately, few people read the rest of the paper. Many of Knuth's "structured goto" examples have since been added into mainstream programming languages as exceptions or various types of "break" statements, but the most interesting ones still work only as tail calls or gotos, and therefore are simply not possible in certain languages. In fact, most programmers these days would never even think of the solutions that Knuth considers most elegant, because current languages have left them with a huge conceptual blind spot.