While on the subject of "limited semantic gotos", I suppose that a purist would consider the use of 'last', 'next', multiple 'return' statements, and in other languages, 'break' to be a form of goto; particularly if a label used.Uhm, not just a purist. "Goto" is like pregnancy - there isn't a halfway of doing it. Dijkstra's paper isn't about the four letters "g", "o", "t", and "o". His arguments against "goto" hold against "last", "next" and "return" in exactly the same way. Dijkstra's point is, (and IIRC, that's what Dominus wrote as well) that if you want to do any kind of formal proving of your program, life becomes much, much easier if your blocks of code have exactly one entry point, and exactly one exit point. Goto breaks that. And so do "last", "next", "redo", "die", and "return".
In reply to Re: An exploration of higher-level-language approaches to the "First all-zero row in an NxN matrix" problem (goto Considered Harmful)
by JavaFan
in thread An exploration of higher-level-language approaches to the "First all-zero row in an NxN matrix" problem (goto Considered Harmful)
by davido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |