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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ec4cde5d799065b6 X-Google-Attributes: gid103376,public From: "Shmuel (Seymour J.) Metz" Subject: Re: GOTO considered Satanic (was: Is there an ADA analogue to the C++ continue statement?) Date: 1997/09/25 Message-ID: <342AA3D0.3239@gsg.eds.com>#1/1 X-Deja-AN: 275549831 References: <3422F037.41CA@lmco.com> <3423AF1B.5152@i.b.m.net> <6098m7$a24$1@krusty.irvine.com> <3429EAB6.32DB@cs.adfa.oz.au> Organization: EDS MS Reply-To: nospam@gsg.eds.com Newsgroups: comp.lang.ada Date: 1997-09-25T00:00:00+00:00 List-Id: Alan Brain wrote: > I wish I could be as sanguine. I've seen some really bad spaghetti > written in modern languages. I've seen some really bad spaghetti with nary a GOtO in sight. Really convoluted stuff involving deeply nested IFs with boolean flags tested well away from where they are set and other sorts of highly nonlocal behavior. Essentially the coders (I hesitate to call them programmers) were using a screwdriver as a hammer; not a pretty sight, I might add. Any control structure is subject to abuse, and anyone doing a code review should be as alert to a misused IF as they are to a misused GOTO or to a misused global variable. Some question my use of the term "spaghetti" to describe such code. However, if I have to skip around in the code to figure out "how did that variable get set", that's highly analogous to skipping around to figure out "how did I get here". -- Shmuel (Seymour J.) Metz Senior Software SE The values in from and reply-to are for the benefit of spammers: reply to domain eds.com, user msustys1.smetz or to domain gsg.eds.com, user smetz. Do not reply to spamtrap@library.lspace.org