[comp.lang.c] Gotos and why we should stop talking about them

raymond@wish-bone.berkeley.edu (09/12/89)

Please, everybody.  Before arguing about the merits of goto's, please

[1] Count to ten, and then to ten again.
[2] Go fetch your copy of "Structured programming with go to statements"
    by D. E. Knuth (1972?) and read it.  If necessary, find the person you
    lent it to and ask for it back.
[3] If you still feel like arguing, go to step 1.

Thank you.  We now return you to the regular comp.lang.c discussions
about null pointers, order of evaluation, and "I wish C had facility X".
--
Raymond Chen					raymond@math.berkeley.edu

djones@megatest.UUCP (Dave Jones) (09/12/89)

[ "Added in proof" -- I just read this over and it may sound a little
  angry. I considered dumping it, but gee, all those keystrokes. ..
  So, just imagine that it's filled with smileys. I'm almost completely
  cured of getting angry. Yes, much better, now, thank you, although I do
  tend to relapse around mid April. ]



From article <1989Sep12.004811.27855@agate.berkeley.edu>, by raymond@wish-bone.berkeley.edu:
> Please, everybody.  Before arguing about the merits of goto's, please
> ... [ don't. ]

Hey!! That was what I said, lo these many months ago. True, I obliquely
suggested that it was arguable as to whether they were as bad as
some people might think, (mistake number one), but my main point
was that topic was just not worth the bandwidth it was getting at the time.

The rest, as they say, is histrionics.

You see, some of the, shall I say, "self-assured" net.pedants came down
on me like a duck on a junebug, saying flatly that as a defender of the
Evil goto, I was obviously incompetent and that software from the company I
worked for was suspect. That really got my goat. There I was, playing
with my employer's computer, and I had provoked some nitwits into impugning
our product publicly. Never mind that they did not even know what we produce,
they felt quite qualified and justified to judge, and eagerly cast the
first, second, and third rounds of stones.

Nobody came to my defense except for one nice man who very meekly pointed
out that I had never said I endorsed or used gotos, only that they were not
worth arguing about. Nobody took notice. I watched from the sidelines as a
debate on gotos and quality assurance ensued. Being new to the net at
that time, I was appalled. I wanted an apology. Knowing now the kind of
rudeness that goes down daily on the net, it seems silly to have worried
about it. In truth, it seems silly to have worried about it in any case,
but back then I was a naive, headstrong youth of forty, and I wanted an
apology. I asked for one publicly.  Mistake number two.

To apologize or not?  A public trial had to be held!

I didn't know about Knuth's paper.  Without the force of Authority on my
side, I could not appeal to the precedent from a higher court. Besides,
I had never even said there WAS a proper place for the goto, so why should
I have to defend it?  I was tried and convicted in abstentia. With no one
arguing for the defense, the Authorities In Residence pronounced me guilty.

I was even more appalled to learn that my detractors thought that having
judged themselves correct on "gotos" they had justified the abuse. They had
determined that gotos were bad. Therefore what they said about my competence
was true. Therefore defamation was justified. Therefore no apology. Case
closed.

I went away and sulked.  It all seems very silly in retrospect.

The reason I brought this up again is not just for mischief, honest. I just
thought it ironic that at the time I was being bashed as a goto-slinging
hacker, I had not one goto in all the code I had online, and there was
a bunch of it. The other day I wrote one, so I thought I would share it with
you, that's all.