Perhaps because I took
CS 101 back when one's grade was inversely related to the
number of lines of Fortran or PL/I code one wrote, I never fully bought into the
all-goto's-are-disastrous-and-must-be-abolished school of thought espoused by Dijkstra in his landmark
Go To Statement Considered Harmful (and
embraced by Standards Nazis
everywhere!).
As such, when I visited Data Steps and saw Stephen Philp's Ode to GO TO, it was nice to see someone argue that GO TO statements still have their place (as does the legendary Donald Knuth, BTW!).
So, how about it?
Do we really want to deny kids learning to program the joy of coding their first GO TO HELL?








1. Ted,
Actually Dijkstra never said never use a GoTo Statement and if one is so inclined to read some of his later writings he even admits that he wished he had phrased that whole thing differently. Basically the way I see it is that most of the time poeple use GoTo statements where none is needed. Looking at the code you referenced it can be rewritten just as easily and possibly clearer (depends on who you ask) without using a GoTo statement at all.
Posted at 6:39AM on Dec 19th 2005 by Toby Dunn