|
Authored by: jesse on Monday, May 21 2012 @ 08:19 AM EDT |
Only when they are misused.
The original objections to "goto" are due to the willy-nilly insertion
of goto in programs by the inexperienced.
Minor story- I used to be the Pascal maintainer at school (many many years ago).
There were two bugs in the N. Wirth compilers - both were caused by a goto. The
one I remember best was in comment scanning. The scanner would loose an
"*" if there were an odd number in a comment row at the end. This was
discovered by a student who was blocking out functions with header/trailers of
"(*****)" comments, causing the end comment mark "*)" to be
lost.
The bug was using a "goto" to avoid a double test...
Turned out that these were the only two goto statements in the entire compiler.
Even the best can fail at using a "goto" properly.[ Reply to This | Parent | # ]
|
|
|
|
|