From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,86fd56abf3579c34 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-28 04:08:54 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!godot.cc.duq.edu!news.duke.edu!news.mathworks.com!news.kei.com!world!blanket.mitre.org!linus.mitre.org!spectre!eachus From: eachus@spectre.mitre.org (Robert I. Eachus) Newsgroups: comp.lang.ada Subject: State machines and Goto's (was Re: Should internet support software be written in Ada?) Date: 27 Mar 1995 19:43:21 GMT Organization: The Mitre Corp., Bedford, MA. Distribution: world Message-ID: References: <3kaksj$iur@isnews.calpoly.edu> <3ki9t8$c8l@Starbase.NeoSoft.COM> <3ks2o3$bab@theopolis.orl.mmc.com> <1995Mar27.113400@di.epfl.ch> NNTP-Posting-Host: spectre.mitre.org In-reply-to: Robb.Nebbe@di.epfl.ch's message of 27 Mar 1995 09:50:34 GMT Date: 1995-03-27T19:43:21+00:00 List-Id: In article <1995Mar27.113400@di.epfl.ch> Robb.Nebbe@di.epfl.ch (Robb Nebbe) writes: > Now a permanent transfer of control is almost never what you want. The > only use I have found is in implementing state machines but even then > a goto is not always the best solution. If you need access to state > information then you should probably not use gotos. The only goto's I have ever used in Ada, PL/I, Algol, etc. have been either in compiler testing or in state machines. (The former is, of course, no reason to include them in a language.) So AFAIK, the only legitimate use of gotos are in state machines. Of course, compiler builders are among the most prolific users and builders of state machines, so compiler builders want to retain gotos. The question is does that justify their inclusion in modern programming languages? My guess is that the answer is no, but that it is a close call. However, the cost to implement gotos is small, and compiler writers will always voluteer to pay it. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...