goat ooze [was mostly Re: Infocom on PDP-11]

der Mouse mouse at Rodents.Montreal.QC.CA
Wed May 11 22:45:30 CDT 2005


[Paul Koning <pkoning at equallogic.com>]
> That was the first time in many years -- on this topic I agree with
> Dijkstra.  But I don't believe he ever advocated not using it ever,
> only that it should be avoided when there's a better answer, which is
> in about 99% of the cases, but not 100%.

[Vintage Computer Festival <vcf at siconic.com>]
>> That was the first time in many years [...rest of above quote...]
> Right.  But the way it's taught generally (at least in my experience
> and observation) is that you should expend an hour of thinking and 10
> lines of code development rather than use a simple GOTO which would
> suffice quite nicely and be more logical and readable.

[Jay West <jwest at classiccmp.org>]
> I was preached to in college about not using [the goto], but I still
> did.  For many years in professional life as well.  But when I got
> the C bug, I started conciously trying to keep it out of the other
> languages I used.  [...and it's been good...]

My position on the goto is that "don't use gotos" is a good thing to
teach students.  As long as they are coders who need to rely on what
they're taught, they shouldn't use gotos, because they won't know when
to use them and when not to.

As with many other fields, you have to first learn the rules and fully
internalize them before you're good enough to know when it's okay to
break them.

Yes, I use gotos.  Very occasionally.  Except for throwing out of
nested functions in gcc, or when semi-mechanically translating labeled
control structure for use with compliers that don't have it, I can't
remember the last time I used one.  (In neither use do I know of any
real alternative, though I do wish for an unwind-protect for the
former.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse at rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


More information about the cctalk mailing list