comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: GOTO considered necessary (reworked)
Date: 1997/06/13
Date: 1997-06-13T00:00:00+00:00	[thread overview]
Message-ID: <EBpyKy.J3@world.std.com> (raw)
In-Reply-To: 5nn2fm$11dk$1@prime.imagin.net


In article <5nn2fm$11dk$1@prime.imagin.net>,
Samuel Mize <smize@imagin.net> wrote:
>I'm rebeating a dead horse, in order to write up a consensus paper to
>submit to adahome.  I'll appreciate your input.

I don't quite understand what the point of this is.  I mean, it's fun to
argue about goto statements, but there's no real problem here.  There's
not a lot of Ada code out there filled with rats nests of gotos, so
what's the point of admonishing people about it?  The range of opinions
on this point goes from "it's never appropriate to use goto" to "it's
hardly ever appropriate to use goto" -- not a very wide range.  I don't
hear anybody saying "avoid if/case/loop, and always use goto whenever
possible".

And new Ada programmers these days are naturally happy to use
if/case/loop most of the time (unless their mind has been polluted by
spending too much time writing code in a language that doesn't *have*
if/case/loop).

As you say:

>f) The shared Ada culture avoids "goto" statements.  Gellerich et al examined
>   34428 files containing 8.5 million lines of code, coded by many projects,
>   institutions, and programmers.  They found a "goto" density of 1 "goto" per
>   13614 lines of code. ...

If there aren't many goto's in real Ada code, then clearly there aren't
many cases of misuse of goto.

Note that the above statistic doesn't mean Ada programmers think goto is
evil.  I mean, if you count the number of delay statements, you'd come
up with a similar low density -- even a tasking program will typically
have far more if statements, assignment statements, etc than delay
statements.  The above statistic just means that people don't think goto
is appropriate very often -- just like delay isn't appropriate very
often.

Like I said, I think it's fun to argue about gotos, and if I have time
maybe I'll reply to your technical points (most of which I agree with,
by the way).  But I don't think your goto FAQ is addressing any
practical problem in the world.

- Bob




  parent reply	other threads:[~1997-06-13  0:00 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-11  0:00 GOTO considered necessary (reworked) Samuel Mize
1997-06-11  0:00 ` Bryce Bardin
1997-06-12  0:00 ` Michael F Brenner
1997-06-17  0:00   ` Robert Dewar
1997-06-17  0:00     ` Robert A Duff
1997-06-20  0:00       ` Robert Dewar
1997-06-21  0:00         ` Robert A Duff
1997-06-21  0:00           ` Robert Dewar
1997-06-12  0:00 ` Anonymous
1997-06-12  0:00   ` John G. Volan
1997-06-16  0:00     ` Anonymous
1997-06-12  0:00   ` Robert Dewar
1997-06-12  0:00     ` John G. Volan
1997-06-13  0:00       ` Robert A Duff
1997-06-16  0:00         ` John G. Volan
1997-06-17  0:00           ` Robert A Duff
1997-06-25  0:00             ` Van Snyder
1997-06-17  0:00           ` Robert Dewar
1997-06-17  0:00             ` Robert A Duff
1997-06-18  0:00               ` Spam Hater
1997-06-20  0:00               ` Robert Dewar
1997-06-21  0:00                 ` Robert A Duff
1997-06-21  0:00                   ` Robert Dewar
1997-06-20  0:00               ` Robert Dewar
1997-06-25  0:00               ` Wolfgang Gellerich
1997-06-25  0:00                 ` Samuel T. Harris
1997-06-25  0:00                 ` Michael F Brenner
1997-06-26  0:00                   ` Wolfgang Gellerich
1997-06-19  0:00             ` Karel Th�nissen
1997-06-19  0:00               ` Karel Th�nissen
1997-06-23  0:00               ` John G. Volan
1997-06-23  0:00                 ` Robert Dewar
1997-06-24  0:00                   ` Brian Rogoff
1997-06-25  0:00                   ` Featuritis not always bad (was re: GOTO considered necessary) Karel Th�nissen
1997-06-26  0:00                     ` Robert Dewar
1997-06-26  0:00                       ` Karel Th�nissen
1997-06-23  0:00                 ` GOTO considered necessary (reworked) Spam Hater
1997-06-25  0:00                 ` Karel Th�nissen
1997-06-23  0:00             ` John G. Volan
1997-06-17  0:00           ` Robert I. Eachus
1997-07-21  0:00           ` Shmuel (Seymour J.) Metz
1997-06-13  0:00 ` Robert A Duff [this message]
1997-06-14  0:00   ` Robert Dewar
1997-06-16  0:00     ` Spam Hater
1997-06-17  0:00       ` Robert Dewar
1997-06-17  0:00         ` Spam Hater
1997-06-16  0:00     ` Robert A Duff
1997-06-17  0:00       ` Spam Hater
1997-06-17  0:00         ` Robert A Duff
1997-06-19  0:00           ` Spam Hater
1997-06-17  0:00         ` Robert Dewar
1997-06-17  0:00           ` Spam Hater
1997-06-17  0:00           ` Robert A Duff
1997-06-19  0:00             ` John Herro
1997-06-25  0:00               ` Function result Van Snyder
1997-06-27  0:00                 ` Jon S Anthony
1997-06-27  0:00                 ` Robert Dewar
1997-06-20  0:00             ` GOTO considered necessary (reworked) Robert Dewar
1997-06-14  0:00   ` Samuel Mize
1997-06-14  0:00   ` Samuel Mize
1997-06-14  0:00     ` Matthew Heaney
1997-06-16  0:00 ` Anonymous
1997-06-16  0:00   ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox