comp.lang.ada
 help / color / mirror / Atom feed
From: "Shmuel (Seymour J.) Metz" <nospam@gsg.eds.com>
Subject: Re: GOTO considered necessary (reworked)
Date: 1997/07/21
Date: 1997-07-21T00:00:00+00:00	[thread overview]
Message-ID: <33D3D189.1E0@gsg.eds.com> (raw)
In-Reply-To: 33A58C79.1C7A@sprintmail.com


John G. Volan wrote:
> 
> A programmer has a well-defined
> control structure in mind (e.g., FSA's, or loop continue), but the
> language does not provide a syntax for it (although such a syntax could
> easily be imagined).
> 
> If the structure were available in the language, of course there would
> be no question of using gotos for the same purpose.  Barring that, gotos
> can be used to _simulate_ this structure, but this will always be a
> dangerous practice, because the gotos are only at best a simulation of
> the actual construct the programmer has in mind.  Gotos lack
> "robustness"; certain important properties of the hypothetical structure
> (e.g., prevention of "fall-through" between states in an FSA) cannot be
> guaranteed except by programmer vigilance.

Much the same could be said of any control structures; the programmer
simulates the control structures that he has in mind using the control
sturctures that the language provides, e.g., if, while. Those control
structures "are only at best a simulation of
> the actual construct the programmer has in mind." Depending on what the programmer is attempting to simulate, the goto may be safer than the alternatives.
> 
> > I would also agree, if you said, "As a rule of thumb, if you think you
> > want to use a goto, think twice."

I would say that no matter what linguistic construct you use, you should
think twice. But then, I have a quaint predjudice in favor of programs
that work and that continue to work when they are modified. Program in
haste, debug at leisure is not prudent regardless of what language
constructs you use.
 
>   (Name       => "John G. Volan",
>    Employer   => "Texas Instruments Advanced C3I Systems, San Jose, CA",
>    Work_Email => "johnv@ti.com",
>    Home_Email => "johnvolan@sprintmail.com",

-- 

                        Shmuel (Seymour J.) Metz
                        Senior Software SE

The values in from and reply-to are for the benefit of spammers:
reply to domain eds.com, user msustys1.smetz or to domain gsg.eds.com,
user smetz.




  parent reply	other threads:[~1997-07-21  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 ` 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-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 A Duff
1997-06-25  0:00             ` Van Snyder
1997-07-21  0:00           ` Shmuel (Seymour J.) Metz [this message]
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-13  0:00 ` Robert A Duff
1997-06-14  0:00   ` Samuel Mize
1997-06-14  0:00     ` Matthew Heaney
1997-06-14  0:00   ` Samuel Mize
1997-06-14  0:00   ` Robert Dewar
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           ` 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           ` Spam Hater
1997-06-17  0:00         ` Robert A Duff
1997-06-19  0:00           ` Spam Hater
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 ` 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