1. Re: When it comes to GOTOs... - Reply
This is my last word on the subject of GOTOs, promise.
Robert B Pilkington wrote:
>The point is, to me, a GOTO breaks the flow of the program, requiring
>you to jump somewhere else in the code adrubtly, with all the chaos of
>trying to figure out what variables you've already assigned, which
>ones aren't, which ones need to be reassigned, trying to figure out
>what can jump to it, wondering how to get back to where you were (oh
>no, another GOTO!). They are like cancer, you get one, and you all of
>the sudden need more, and pretty soon, your code is tangled worse than
>the cables behind your computer . . .
Very emotional language. But it fails to tell you, or even realize,
that the goto is really the same, conceptually, as any early exit
from a loop, or multiple returns from a routine, or an if..then
statement for that matter. The difference is only in scale and,
perhaps, in sophistication: the goto can jump backward just as well as
forward...
But I think this is a battle I do not want to fight. I better leave it
to you to enjoy your unfounded fears and to torture yourselves and your
code trying to avoid gotos. jiri