"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