comp.lang.ada
 help / color / mirror / Atom feed
From: "Theodore E. Dennison" <dennison@escmail.orl.mmc.com>
Subject: Re: Help with Exceptions!
Date: 1996/05/14
Date: 1996-05-14T00:00:00+00:00	[thread overview]
Message-ID: <31987FF6.2781E494@escmail.orl.mmc.com> (raw)
In-Reply-To: 318F94D9.35AB@io.com


Robert I. Eachus wrote:
> 
> In article <319764DA.3A8C@io.com> Dave Jones <davedave@io.com> writes:
> 
>   > Most others seem to have an experience similar to mine: "goto"
>   > means you need to change your approach.  So I was wondering, has
>   > anyone out there ever encountered a situation where "goto" was
>   > actually necessary?
> 
>    The only two cases in which I have used gotos in are:
> 
>    1) Testing the compiler's implementation of gotos for correctness.
> 
>    2) Implementation of table driven finite-state machines.
> 
>     The latter requires a bit of explanation.  Machine generated FSMs
> can use lots of gotos, but I have never seen an Ada FSM generator
> which does that. Implementing the entire FSM by hand with gotos is
> heap bad juju.  But often you want a state table entry to have the

This question came up here about a year ago (inadvertantly raised by
myself), and kicked up quite a ---- storm. I think the general consensus
at the end was that there are situations where a FSM algorithm may 
be implemented more clearly with goto's that without. Personally, I'd 
rather write the unclear non-goto code. The Goto is one genie I'm not
about to release from the bottle.

However, I remember vividly the ferocity of Robert Dewar's arguments in 
favor of goto's for FSM's in compilers. Thus I'd be willing to wager
that if you look through GNAT's source code, you will find gotos. I
don't KNOW this, its just a (perhaps poorly) edjucated guess on my part.

-- 
T.E.D.          
                |  Work - mailto:dennison@escmail.orl.mmc.com  |
                |  Home - mailto:dennison@iag.net              |
                |  URL  - http://www.iag.net/~dennison         |




  parent reply	other threads:[~1996-05-14  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-07  0:00 Help with Exceptions! Robert Gelb
1996-05-07  0:00 ` Steve Howard
1996-05-07  0:00   ` Robert Dewar
     [not found]   ` <4mqio5$a8b@news.sanders.lockheed.com>
1996-05-09  0:00     ` Robert L. Spooner, AD3K
1996-05-10  0:00   ` Jon S Anthony
1996-05-10  0:00     ` Robert A Duff
1996-05-07  0:00 ` John Herro
1996-05-07  0:00 ` Vincent Smeets
     [not found] ` <318F94D9.35AB@io.com>
1996-05-10  0:00   ` George F.Rice
1996-05-13  0:00     ` Dave Jones
1996-05-13  0:00   ` Robert I. Eachus
1996-05-14  0:00     ` John Herro
1996-05-14  0:00       ` Robert I. Eachus
1996-05-14  0:00   ` Theodore E. Dennison [this message]
1996-05-14  0:00     ` Robert A Duff
1996-05-14  0:00 ` Michel Gauthier
1996-05-14  0:00   ` Robert A Duff
1996-05-15  0:00     ` Norman H. Cohen
1996-05-15  0:00       ` Robert A Duff
1996-05-15  0:00 ` Michel Gauthier
1996-05-16  0:00 ` Jon S Anthony
1996-05-16  0:00 ` Jon S Anthony
1996-05-16  0:00   ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1996-05-09  0:00 tmoran
replies disabled

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