gotos

Brian T. Schellenberger bts at sas.UUCP
Tue May 3 13:43:28 AEST 1988


In article <64 at lakart.UUCP> dg at lakart.UUCP (David Goodenough) writes:
|
|The ONLY time I use a goto is because C doesn't have a 'break 2' construct:
|Maybe someone should suggest it to the ANSI crowd - it can't be that hard to do.

I submit that goto's are clearer than "break 2", and that the sentiment to
add "break n" in order to purge gotos is a sign of people who have gotten so
wrapped up a particular manifestation (gotos) of a problem (obscure code) that
they are moved to ask for treatment for the symptoms even when they make the
disease worse.

This reminds me of the military, which is always fighting the previous war.

(I would, however, support "break loop" for the special case of breaking out
of a while/do/for loop from inside of a nested "switch".  I find the inability
to get out of there cleanly very annoying.)
-- 
                                                         --Brian.
(Brian T. Schellenberger)				 ...!mcnc!rti!sas!bts

. . . now at 2400 baud, so maybe I'll stop bothering to flame long includes.



More information about the Comp.lang.c mailing list