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: g2news2.google.com!postnews.google.com!j32g2000prh.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Wed, 15 Dec 2010 15:14:17 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.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 1292454857 2294 127.0.0.1 (15 Dec 2010 23:14:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 15 Dec 2010 23:14:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j32g2000prh.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: g2news2.google.com comp.lang.ada:16937 Date: 2010-12-15T15:14:17-08:00 List-Id: On Dec 15, 2:52=A0pm, Keith Thompson wrote: > Robert A Duff writes: > > > > > > > "Vinzent Hoefler" <0439279208b62c95f1880bf0f8776...@t-domaingrabbing.de= > > > writes: > [...] > >> I agree with Georg here, this is an unnecessary change with no apparen= t use, > >> it doesn't support neither of the three pillars of the Ada language "s= afety", > >> "readability", or "maintainability". > > > It certainly supports readability. =A0I find this: > > > =A0 =A0 if Debug_Mode then > > =A0 =A0 =A0 =A0 pragma Assert(Is_Good(X)); > > =A0 =A0 end if; > > > slightly more readable than: > > > =A0 =A0 if Debug_Mode then > > =A0 =A0 =A0 =A0 null; > > =A0 =A0 =A0 =A0 pragma Assert(Is_Good(X)); > > =A0 =A0 end if; > > So, um, why is Assert a pragma rather than a statement? > > =A0 =A0if Debug_Mode then > =A0 =A0 =A0 assert Is_Good(X); > =A0 =A0end if; > > As somebody pointed out, it was defined that way in Ada 80. > > Or am I opening a huge can of worms by asking that question? Somebody on the ARG might have a more authoritative answer. My reading of AI95-286 is that a number of Ada compilers had already implemented the Assert pragma and there was a lot of code using it. Of course, those compilers couldn't have added "assert" as a statement on their own, but adding an implementation-defined pragma is OK. I'm guessing that there was probably code out there that used Assert as a procedure, so adding this as a reserved word would have caused problems. -- Adam