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: backlog1.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Differences between Ada 83 and other revisions Date: Wed, 19 Feb 2014 23:23:44 +0100 Organization: A noiseless patient Spider Message-ID: References: <19ac8735-7a9c-429f-a111-a1b3c4b0985b@googlegroups.com> <3872de7d-2df4-4ddb-8348-45eb03b3588e@googlegroups.com> <6aca36a4-cd78-4098-a1f7-646cb37cd14d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 19 Feb 2014 22:23:43 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="2b3884a634d8f846e0712b4e3a92507a"; logging-data="10287"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nUMtvAgONzZaOEvHfRlhj" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: Cancel-Lock: sha1:jaTH+sRt/slhSFOSEuWPCwYJVhw= X-Enigmail-Version: 1.6 Xref: number.nntp.dca.giganews.com comp.lang.ada:185012 Date: 2014-02-19T23:23:44+01:00 List-Id: Le 19/02/2014 23:09, Robert A Duff a écrit : >> But AdaControl can find every use of (instantiations of) Unchecked_*, >> and all usages of 'Address, or only address clauses that refer to the >> address of another object. > > That's useful. Can it find all unsafe features? There are some > that are quite difficult to detect, such as passing a component > of a variant record to a procedure that causes that component > to vanish. Not this one, currently. But if you are willing to fund the development of this check, I'll be very happy to add it! >> There needs to be a boundary between what is checked by the compiler and >> what is best handled by external tools; you may not agree to where the >> line has been drawn, but tools that can find unsafe features do exist! > > I didn't mention any compiler checking up there. I said "search". > I'm asking for a language-design principle that says "you cannot use > any unsafe feature without with-ing a package called Unsafe, or a descendant > thereof". Then a simple search for "unsafe" finds them all, without > any need for sophisticated tools. > > Can you name all the unsafe features of Ada off the top of your head, > and tell what strings to search for to find them? I can't. You can > find them by looking up "erroneous" in the Index. > Right, but be careful not to throw the baby with the bathwater. You can find many of the unsafe features, and that's much better than any other language! -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr