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-27 18:20:05 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!epflnews!dinews.epfl.ch!di.epfl.ch!Robb.Nebbe From: Robb.Nebbe@di.epfl.ch (Robb Nebbe) Newsgroups: comp.lang.ada Subject: Re: Should internet support software be written in Ada? Date: 27 Mar 1995 09:50:34 GMT Organization: Ecole Polytechnique Federale de Lausanne Sender: nebbe@lglsun3.epfl.ch (Robb Nebbe) Distribution: world Message-ID: <1995Mar27.113400@di.epfl.ch> References: <3kaksj$iur@isnews.calpoly.edu> <3ki9t8$c8l@Starbase.NeoSoft.COM> <3ks2o3$bab@theopolis.orl.mmc.com> NNTP-Posting-Host: lglsun3.epfl.ch Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: 1995-03-27T09:50:34+00:00 List-Id: In article <3ks2o3$bab@theopolis.orl.mmc.com> Theodore Dennison writes: ... >Now, I too have seen some bad C code in my time. But this is the first I have >EVER seen anyone actually use a "goto". In a language with a good selection of >looping constructs like C, there is NO excuse for this. (Well, perhaps >stupidity...) As a control structure a goto provides something that the "structured" control structures do not provide: a permanent transfer of control. Loops, and subprogram calls represent a temporary transfer of control. 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. Fred McCall is probably correct in pointing out that we don't really have enough information in the code fragment to judge is the use of gotos was appropriate or not. However, I'm more than a little suspicious when I see code like that. Robb Nebbe