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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cae92f92d6a1d4b1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Mon, 13 Dec 2010 16:25:17 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1292279120 30897 69.95.181.76 (13 Dec 2010 22:25:20 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 13 Dec 2010 22:25:20 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Xref: g2news2.google.com comp.lang.ada:16886 Date: 2010-12-13T16:25:17-06:00 List-Id: "Georg Bauhaus" wrote in message news:4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net... ... > > Some found the explicit null statement to be unusual, > bothersome, and confusing in the presence of a pragma. > Thus it was dropped by the language designers. The logic is that you need a "null;" statement when there is nothing in some list of statements. A pragma (or label) is not "nothing", so the requirement for "null;" is illogical in those cases. > The little learning it took, the few words of explanation, > explicitness of intent dropped in favor of a special case in Ada > 2012 which lets one use a pragma in place of a null statement. Yes. This is primarily an issue for a pragma Assert. > (And re-introduce "null;" once rewriting / removing debug stuff > / etc is taking place.) True, but that is always the case when removing debug stuff. The change here has no real effect on that. Most of mine is some sort of logging: if Something then else Log_Item ("Something is False"); end if; If I remove the logging, I have to add a "null;" or remove the "else". The situation for a pragma in Ada 2012 is no different: if Something then else pragma Assert (not Something_Else); end if; And it seems less likely that you would change this than the first form, and neither seems that likely. (Note that this was not a change I cared about much in either direction. The use of pragmas for executable things is bad language design IMHO, and in any I simply don't use them for that sort of purpose, because they are much too limited to be of much use in a complex system.) > Let's hope we can buy support tools in the future to > help us ensure the effects of language special casing can > be bridled per project. I'd suggest you stick with Ada 2005. Ada 2012 is all about easier ways to write Ada code: not just these tweaks, but also conditional expressions, expression functions, iterator syntax, indexing of containers, the reference aspect (giving automatic dereferencing) are all "syntax sugar". That is, they're all about making it easier to write (and in most cases, read) Ada code in a style that is closer to the problem rather than the solution. (One could also put all of the contract stuff into this category, as you can write preconditions, postconditions, invariants, and predicates using pragma Assert -- it's just a lot more reliable for the compiler to decide where they need to go.) Randy.