Segher Boessenkool segher@kernel.crashing.org writes:
The initial idea why you should _not_ use GOTOs is that GOTOs suck ;-) There was a paper called "Go To Statement Considered Harmful" from Edsger W. Dijkstra (and that man probably knows what he's talking about) in 1968 (!). GOTOs usually produce unreadable, unmaintainable code and should generally not be used.
Using gotos instead of higher-level control structures is evil. Using such control structures to simulate goto is just as evil.
You mean you don't like people writing loops with function calls?
void loop(int n) { if (n > 0) loop(n); return; }
Sorry I couldn't resist. But you certainly have the gist of the Dijkstra's argument. Of course we was slightly biased having introduced several of the higher level constructs if I recall correctly. :)
Eric