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.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a7f223906eb859a X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: GOTO considered necessary Date: 1997/06/07 Message-ID: #1/1 X-Deja-AN: 246817147 References: <5n977i$2cmc$1@prime.imagin.net> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-06-07T00:00:00+00:00 List-Id: Sam says <<2) As a rule of thumb, if your code needs a "goto" to work efficiently (or at all), you have probably overlooked a simpler, better design. >> Oh dear, yes, this horse is truly dead and almost mummified one would say, but the above rule of thumb is far too dogmatic (and see Knuth by all means!) There are many places where a goto is the natural and clearest way of doing things. It is true that there exist programmers who are so incompetent that the only way of stopping them from misusing gotos is to stop them from using them at all, but assuming you are not in this category, there is no reason to write convoluted code to avoid a goto. THere are many obvious examples, one of the most familiar is to provide a continue facility for loops while ..... loop ... <> end loop;