comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: GOTO considered necessary (reworked)
Date: 1997/06/14
Date: 1997-06-14T00:00:00+00:00	[thread overview]
Message-ID: <dewar.866304502@merv> (raw)
In-Reply-To: EBpyKy.J3@world.std.com


Bob says

<<Note that the above statistic doesn't mean Ada programmers think goto is
evil>>


No, but we do know, without statistics, that some Ada programmers regard 
goto's as evil, and go through nasty contortions to avoid them. So Sam's
very reasonable position statement is not completely irrelevant, if it
convinces even one of these anti-goto fanatics to moderate their position,
that is useful.

I agree that it is not necessary to admonish Ada programmers not to use
goto statements.


However, there are some useful points here that apply more widely. Machine
generated code that will not be looked at by people can have all the gotos
it likes (Sam covers this point). This is of course obvious to anyone with
the slightest sense. BUT, I know at least one case in which a perfectly
reasonable tool was rejected because the Ada it output did not meet
corporate standards (which had a silly zero-tolerance position on gotos).


Yes, among reasonable people, we have a reasonable consensus that style
issues are almost never absolute, and that it is a BAD THING to convert
recomendations into hard clad rules, and in particular, to convert rules
that say "minimize the use of X", to "avoid the use of X". But in the
real world, there are plenty of nitwits around writing style manuals
who do exactly that.

I have several times now run into people saying that they were forced to
code in C in situation XXX. Incredulous, I query them, and suggest that
they could perfectly well do that in Ada using Unchecked_Conversion.
"Oh, they say, we can't use UC, it's forbidden by our coding conventions."

Then when I complain that that is a silly idea, they follow up with

"But UC is potentially implementation dependent, we are required to write
portable code"

Of course their criterion for beautiful guaranteed implementation dependent
code in C is that it passes at least some execution tests on the platform
they happen to be running on!

(note for example, Joe Gwinn's repeated claim that you can manage IO mapped
memory in C. Totally bogus of course, there is nothing in the ANSI standard
for C that assures you of this -- what is true of both C and Ada is that
in practice, given reasonable assmptions, you can handle memory mapped
IO, even though there is no guarantee from the language that it will work.






  parent reply	other threads:[~1997-06-14  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 I. Eachus
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-20  0:00               ` Robert Dewar
1997-06-21  0:00                 ` Robert A Duff
1997-06-21  0:00                   ` Robert Dewar
1997-06-25  0:00               ` Wolfgang Gellerich
1997-06-25  0:00                 ` Michael F Brenner
1997-06-26  0:00                   ` Wolfgang Gellerich
1997-06-25  0:00                 ` Samuel T. Harris
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                 ` Spam Hater
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-25  0:00                 ` GOTO considered necessary (reworked) Karel Th�nissen
1997-06-23  0:00             ` John G. Volan
1997-06-17  0:00           ` Robert A Duff
1997-06-25  0:00             ` Van Snyder
1997-07-21  0:00           ` Shmuel (Seymour J.) Metz
1997-06-13  0:00 ` Robert A Duff
1997-06-14  0:00   ` Samuel Mize
1997-06-14  0:00   ` Samuel Mize
1997-06-14  0:00     ` Matthew Heaney
1997-06-14  0:00   ` Robert Dewar [this message]
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 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                 ` Robert Dewar
1997-06-27  0:00                 ` Jon S Anthony
1997-06-20  0:00             ` GOTO considered necessary (reworked) Robert Dewar
1997-06-17  0:00         ` Robert A Duff
1997-06-19  0:00           ` Spam Hater
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