4 ms·
Honestly, all the examples in this paper are terrible, either the ones using goto and the goto-less ones. Didn't they know functions in 1987? ;)
by pkolaczk 11y ago
Honestly, all the examples in this paper are terrible, either the ones using goto and the goto-less ones. Didn't they know functions in 1987? ;)
- ggchappell 11y ago> Didn't they know functions in 1987? ;) In all seriousness: only just barely. I entered the undergraduate C.S. program at the U. of Kansas in 1983. The faculty were constantly saying, "We're doing structured programming now!" -- as if they weren't quite convinced yet, and needed to remind themselves. I think this letter does correctly point out that, while simple selection & iteration constructs are sufficient to do anything we want, concise, readable code requires more. And so now we have -- yes -- return, and also break, exceptions, etc. (I'm rather surprised that the idea of a multi-level break, which has been proposed for more than one PL, has never really caught on.) P.S. Perhaps we could title your comment " 'GOTO Considered Harmful' Considered Harmful" Considered Harmful.
- onetwotree 11y agoYes. The author of the linked comment in fact complains that goto-less programming has led to the gratuitous overuse of subroutines. In the absence of modern optimizing compilers this was very inefficient. Imagine the authors horror had he witnessed the use of properties in modern object oriented languages! Of course, properties are almost always trivial for an optimizing compiler, or a JITC, to inline, and inlining is the mother of all optimizations.
- Apocryphon 11y agoK&R 2nd edition came out in 1988, after all.