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!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Tue, 14 Dec 2010 10:53:40 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1292342021 25785 192.74.137.71 (14 Dec 2010 15:53:41 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 14 Dec 2010 15:53:41 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:yB4JvjRaPfDqbhPXfqnN5i18ka8= Xref: g2news2.google.com comp.lang.ada:16903 Date: 2010-12-14T10:53:40-05:00 List-Id: "Vinzent Hoefler" <0439279208b62c95f1880bf0f8776eeb@t-domaingrabbing.de> writes: > I believe, back in the old days, there was a requirement that the presence or > absence of a pragma shall have no effect on the legality of the program, wasn't > it? Yes, something like that. It applied only to implementation-defined pragmas, which smells fishy right there. Anyway, it was a pretty silly rule. So you can erase all the pragmas, and your program is still legal. But the program now does something different (i.e. wrong) at run time. How is this beneficial? Try erasing all the pragmas Abort_Defer from your program! Or for a language-defined one, try erasing all the pragmas Elaborate_All. Either way, your (still-legal) program will be completely broken. > Well, even if it just was that it "shall have no effect on a legal program", I > still wonder why it is so necessary to introduce the possibility to turn an > illegal program (without the null statement) into a legal one merely by adding > some random pragma where a "sequence of statements" was expected. People don't add "random" pragmas. They add useful ones. >...A pragma is > /not/ a statement. True, but a sequence_of_statements can contain pragmas. Huh. A pragma can act as a statement, but can't BE a statement. > I agree with Georg here, this is an unnecessary change with no apparent use, > it doesn't support neither of the three pillars of the Ada language "safety", > "readability", or "maintainability". It certainly supports readability. I find this: if Debug_Mode then pragma Assert(Is_Good(X)); end if; slightly more readable than: if Debug_Mode then null; pragma Assert(Is_Good(X)); end if; - Bob