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,14f7200925acb579 X-Google-Attributes: gid103376,public From: Paul Graham Subject: Re: No Go To's Forever! Date: 2000/03/23 Message-ID: <38DA2F9C.BAFF8C60@cadence.com>#1/1 X-Deja-AN: 601317829 Content-Transfer-Encoding: 7bit References: <38D7B41D.B3494C6A@lmco.com> <8b8m2e$8201@news.cis.okstate.edu> <8b9fk3$l18$1@nnrp1.deja.com> <38D8DFC2.778826FB@cadence.com> <8barci$4ks$1@nnrp1.deja.com> <38D9233B.D51B16A3@cadence.com> <8bbsl4$ani$1@nnrp1.deja.com> <8bd9ve$r1c$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Cadence Design Systems Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-03-23T00:00:00+00:00 List-Id: Ted Dennison wrote: > > In article <8bbsl4$ani$1@nnrp1.deja.com>, > Robert Dewar wrote: > > In article <38D9233B.D51B16A3@cadence.com>, > > > > But surely you would enforce this usage with a tool. There are > > no general defences against sufficiently incompetent > > maintainers. > > A tool? How would such a tool be written? It looks to me like you'd need > an Ada parser to hook it to. Not everyone has the ability or permission > to hack stuff like this into their compiler. Perhaps ASIS could help, > but not every compiler supports ASIS. I was wondering the same thing. I suppose AdaLint could issue a warning for any goto statement within a loop that jumped to a label within the loop, unless the label was immediately followed by a null statement and an end loop. Indeed, many of Ada's features address the "incompetent maintainer" problem. For instance, the problem of maintaining an if statement in C if there is no brace: if (condition) stmt1; stmt2; Here the maintainer thinks he's adding stmt2 to the then-clause of the if statement. The Ada if syntax prevents this from happening. Paul