[comp.lang.c] gotos, punishment

wen-king@cit-vlsi.Caltech.Edu (Wen-King Su) (04/12/88)

In article <4160@auspyr.UUCP> mick@auspyr.UUCP (Michael J. Andrew) writes:
>In article <1988Apr5.213343.1528@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:
<>> Sometimes, gotos are perfectly justifiable because they vastly
>>> simplify and clarify you code.
<>
>>And once in a long while, there is no better way.  A loooong while.
<>If I were running a software house, I'd be tempted to say that using
>>a goto -- except in fixing a program that already uses them -- means
<>having $50 docked from your pay.  It's not *forbidden*, you understand,
>>it's just that you have to want it really badly!
<
>This is a excellent extension to a scheme I keep proposing half-
<seriously to management, to encourage good programming
>practices among novice, sloppy or lazy programmers.
<
>Provide each member of the team a $500 bonus at the start of a new
<project, but deduct $50 each time a global variable is introduced
>into the design.

Hey, come on.  Not all sloppy programs contain goto and not all sloppy
programmers uses goto.  Signing out those who use goto is not going to
solve many problems.  For example, although I have never used a
double-negative construct in any of my writing, my papers are still
next to unreadable.

The issue of goto is very much like driving.  Using goto is like
driving over the speed limit.  Although it doesn't take speeding to be
a bad driver, speeders are being selectively perscuted.  Arguing
whether the use of goto makes one a bad programmer is like arguing
whether speeding makes one a bad driver.  There will never be an answer
that everybody can agree on.  Many people believes that there are valid
reasons to use goto from time to time and many people believes that
there are valid reasons to go over the speed limit from time to time.
Yet, in either case, many other people believe that there is no such
reasons.  The use of goto is not going to go away, nor are speeders.

/*------------------------------------------------------------------------*\
| Wen-King Su  wen-king@vlsi.caltech.edu  Caltech Corp of Cosmic Engineers |
\*------------------------------------------------------------------------*/