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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,67bb3e29a77c25c6 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder.news-service.com!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: pragma Pure (Ada) Date: Fri, 7 Oct 2011 20:08:40 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1318036122 3976 69.95.181.76 (8 Oct 2011 01:08:42 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 8 Oct 2011 01:08:42 +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.6109 Xref: g2news1.google.com comp.lang.ada:21316 Date: 2011-10-07T20:08:40-05:00 List-Id: "Yannick Duch�ne (Hibou57)" wrote in message news:op.v2nigzdfule2fv@index.ici... Le Sat, 01 Oct 2011 03:50:36 +0200, Yannick Duch�ne (Hibou57) a �crit: >> In "A Brief Introduction to Ada 2012" (a great paper from John Barnes) -> >> http://www2.adacore.com/wp-content/uploads/2006/03/Ada2012_Rational_Introducion.pdf > >On page 14 > >> However, the behaviour of components which are records >> is different in Ada 2005 according to whether they are >> tagged or not. If a component is tagged then the primitive >> operation is used (which might have been redefined), >> whereas for an untagged type, predefined equality is used >> even though it might have been overridden. This is a bit >> surprising and so has been changed in Ada 2012 so that all >> record types behave the same way and use the primitive >> operation. > >Not talking for me, but potentially for others: this may possibly >introduce surprising behaviors in ancient applications, isn't it ? Right, although in most cases the change will fix bugs rather than create them. [Someone at AdaCore ran a testing version of GNAT with added code to identify such cases -- all of the code that was found either was test programs created specifically to check for the Ada 83/95 behavior, or cases where the programmer expected "=" to compose (but it didn't). They found no examples of cases where code actually expected non-composition of "=".] There also are some new legality rules, but those of course could only cause an old program to be rejected. (Which would easily be fixed by moving the offending "=" declaration to some visible place.) So these are much less concerning. We spent a lot of effort trying to figure out a way to keep compatibility for old code, but in this case it always came back to the fact that composition of "=" is what is really intended, and any hack to support both makes little sense (no one would intentionally want "=" to not compose). Thus we eventually decided that it was better to just make the change. Randy. -- "Syntactic sugar causes cancer of the semi-colons." [Epigrams on Programming - Alan J. - P. Yale University] "Structured Programming supports the law of the excluded muddle." [Idem] Java: Write once, Never revisit