comp.lang.ada
 help / color / mirror / Atom feed
From: kassover@jupiter.crd.ge.com (David Kassover)
Subject: Re: Problems/Risks ...
Date: 25 Feb 90 20:11:36 GMT	[thread overview]
Message-ID: <5519@crdgw1.crd.ge.com> (raw)
In-Reply-To: 12568231436.32.MOESTMANN@WSMR-SIMTEL20.ARMY.MIL

In article <12568231436.32.MOESTMANN@WSMR-SIMTEL20.ARMY.MIL> AMXMC-SEL@WSMR-SIMTEL20.ARMY.MIL (Mark Oestmann) writes:
>
>AS PERTAINS TO THE Ada 'GOTO':
>
>It is not needed.  Our Software Engineering program is one year in length 
>and has Ada as the core language.  The students do not hear the word 'GOTO'
>as pertains to Ada until the day of graduation.  My parting shot to them is,
>"By the way, Ada does have a 'GOTO'. Don't use it."
>
Oh wow.  Another structured programming debate.  Sorry, I'm
showing my age 8-).
 
Eliminating the GOTO does not eliminate all unconditional
transfers from Ada.

Ada is functionally complete without the GOTO.  There is no
program that could not be written without it.  BUT in some
circumstances the cost of programming around the unconditional
transfer is high.  (Retesting a condition?  when that condition
is REAL-TIME and not likely to be in the same state?  Reading to
the end of a 40 Gigabyte data set (don't laugh, please, such
exist) when it is already determined that such is futile?)
 
There are GOTOs in my Ada code.  A lot less than there would be
if I were using FORTRAN.  But I use them carefully.
 
Textbook cases used for pedagogical purposes are generally very
simple when compared to many real life programs.  Ignoring the
"hard" or "pathological" cases is not a good way to go.


Hmm.  I'm away from my Kernighan and Ritchie.  But doesn't C have
a GOTO statement, too?  Not to mention the trinary operator,
which helps produce unreadable one-line wonders, and by the way,
compiles into inferior machine code using VAX C.  (inferior to
just writing out the IF-THEN-ELSE like normal people  (only have
a grin here))

  reply	other threads:[~1990-02-25 20:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-02-21 23:57 Problems/Risks Mark Oestmann
1990-02-25 20:11 ` David Kassover [this message]
1990-02-25 21:12   ` Eliminating the GOTO William Thomas Wolfe, 2847 
1990-02-26 13:20   ` Problems/Risks John F Nixon
1990-02-26 18:32     ` Problems/Risks David Kassover
replies disabled

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