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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Tests in a software release Date: Wed, 15 Nov 2017 15:58:35 -0600 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Wed, 15 Nov 2017 21:58:36 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="16352"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: feeder.eternal-september.org comp.lang.ada:48916 Date: 2017-11-15T15:58:35-06:00 List-Id: "J-P. Rosen" wrote in message news:oui2vb$5n2$1@dont-email.me... >> On 11/15/2017 01:06 AM, Randy Brukardt wrote: >>> >>> I'd consider making an argument for a pragma to *require* an ELSE part >>> for >>> all IF statements. >> > AdaControl: > check statements (no_else); I don't think that allows a comment starting with "else" in place of the else part. I think that is relatively important, as requiring an empty else adds even more text and thus makes the code harder to read. That is: if Condition then return Result; -- else continue looking for the correct result. end if; compared to: if Condition then return Result; else null; -- Continue looking for the correct result. end if; [Also, the null statement might generate some extra code in the form of an extra jump if optimization is turned completely off.] Randy.