Breaking out of several nested loops (& ANSI C)

Tom Duff td at alice.UUCP
Wed Oct 10 07:48:44 AEST 1984


It's hard to imagine how this proposal (break with a label argument breaks
out of the labelled statement) could be considered `more structured' than
a goto.  It's nothing more than a goto that goes to the statement after
the one with the label.  Of course, the next thing you'll want is to
do the same thing to continue.  That could make continue the semantic
equivalent of goto.  The only restriction would be that you could only
use these things from within the labelled statement.

This is the sort of proposal that closet spaghetti-chefs pull out because
they haven't got the talent or perverted mindset (or whatever it takes)
to write their code without gotos.  They hope that by changing the name
and mumbling nonsense about reducible flow-graphs
they can get the structured-programming fascists to give them back 99%
of their gotos.

Neither side of the goto argument should be satified with this sort of thing.
Those in favor of gotos should not hide their lamp under a bushel, but
should expose it to all of us, if not in pride then as fair warning.
Those opposed should denounce the proposal as invidious subversion.

To quote Ken Thompson:  `if you want go get somewhere, GOTO is the
way to do it.'  If you're going to write code that jumps all over the place,
have the grace not to whitewash it.



More information about the Comp.lang.c mailing list