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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,86fd56abf3579c34 X-Google-Attributes: gid103376,public From: Theodore Dennison Subject: Re: Should internet support software be written in Ada? Date: 1995/03/29 Message-ID: <3lbp1k$jij@theopolis.orl.mmc.com>#1/1 X-Deja-AN: 100540711 references: <3kaksj$iur@isnews.calpoly.edu> <3ki9t8$c8l@Starbase.NeoSoft.COM> <3ks2o3$bab@theopolis.orl.mmc.com> <3l6hra$h05@theopolis.orl.mmc.com> content-type: text/plain; charset=iso-8859-1 organization: IPL InterNetNews site x-url: news:fjm.80.00098C5C@ti.com mime-version: 1.0 newsgroups: comp.lang.ada Date: 1995-03-29T00:00:00+00:00 List-Id: Fred J. McCall writes > >Well, in case you are, I'm now curious. At what times is a "goto" an > >appropriate solution? The best excuse I ever heard was for simulating > Any time the code is 'cleaner' with it than without it. This is often the > case for things like state machines and dispatchers. By all means, though, if > you don't have the judgement to be able to tell, you probably should never use > it. > Could you be more specific than "state machines"? Any algorithm can be expressed as a state machine (I believe there is actually a theorem to this effect, but it's been a while since college). I have written a dispatcher before. It seemed clean enough as a loop enclosing a case statement. I don't think goto's would have made it clearer. T.E.D. (structured programming bigot)