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 Path: g2news1.google.com!postnews.google.com!o14g2000prn.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Tue, 14 Dec 2010 10:23:21 -0800 (PST) Organization: http://groups.google.com Message-ID: <10872143-12a2-4d25-bb08-e236b15d2c18@o14g2000prn.googlegroups.com> References: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net> <1ob32w7tezl5c.j348velixu95.dlg@40tude.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1292351001 20420 127.0.0.1 (14 Dec 2010 18:23:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 14 Dec 2010 18:23:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o14g2000prn.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:15937 Date: 2010-12-14T10:23:21-08:00 List-Id: On Dec 14, 9:45=A0am, Robert A Duff wrote: > "Dmitry A. Kazakov" writes: > > > Because Elaborate_All should never become a pragma. Two wrongs don't ma= ke > > one right. > > Elaborate_All is a pragma because Elaborate is a pragma. =A0;-) And I guess Elaborate shouldn't have been a pragma, either, since it affects the semantics; you can write a program that is not guaranteed to work correctly unless you use this pragma. When I was trying to look into whether such things really fit the definition, I ran into trouble finding a clear non-language-specific definition of what a "pragma" should be. The Ada RM's have very clear definitions. In RM83: "A pragma is used to convey information to the compiler". That's crystal clear, except that in my view the entire text of the program conveys information to the compiler, so it's not really clear what distinguishes a "pragma" from any other line in the source. Ada 95 changed this to "A pragma is a compiler directive". Which of course clears everything up. Of course, my twisted mind thinks an assignment statement is a compiler directive, since it directs the compiler to generate code that assigns something to something else, so I'm not sure that this is a useful definition. Even in Ada 83, there were at least three different flavors of pragmas. Some (LIST, PAGE) had no effect on the operation of the resulting code. Some (OPTIMIZE, INLINE, PACK) could affect the compiler's choice of what kind of code to generate, but the code would produce the same results (unless the code explicitly did something to create a dependency on the compiler's choice, such as relying on 'SIZE of a record that may or may not be packed). And others (ELABORATE, PRIORITY, SHARED, INTERFACE) definitely affected the results---the program's behavior would potentially be different (or, in the case of INTERFACE, be illegal) if the pragma were missing. I'm having trouble figuring out a common thread that ties all these kinds of pragmas into one unified concept---except, perhaps, that they are things that the language designers found it PRAGMAtic to shove into the "pragma" statement instead of inventing new syntax. :) :) :) And personally, I'm fine with that. We can argue and discuss and strive endlessly to come up with a flawless language; but during the time it takes to perfect the language (and then for implementors to implement it), everyone else is stuck using C++ and Java while they're waiting for us, which cannot be good for the world. So a bit of artistic inelegance is, to me, a small price to pay. I guess that's because I'm too much of a ... well ... a pragma-tist? -- Adam