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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8ffd9ca0013db6a7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-10-30 22:53:56 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!europa.netcrusader.net!210.147.7.1!newsfeed.mesh.ad.jp!sjc-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!not-for-mail Message-ID: <39FE6C8F.4EE9@li.net> From: Vincent Marciante X-Mailer: Mozilla 3.0 (OS/2; I) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Redefined "=" = generic disaster? References: <39F13ED9.1EE@li.net> <39F1C092.87D4135E@acm.org> <39F1F686.26B5@li.net> <8tecab$epm$1@nnrp1.deja.com> <39FCEFAD.56BE85B1@ix.netcom.com> <8tkfme$v8a$1@nnrp1.deja.com> <39FE3C35.64CBB3C7@ix.netcom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 31 Oct 2000 01:54:07 -0500 NNTP-Posting-Host: 209.139.0.109 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 972975230 209.139.0.109 (Tue, 31 Oct 2000 06:53:50 GMT) NNTP-Posting-Date: Tue, 31 Oct 2000 06:53:50 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:1653 Date: 2000-10-31T01:54:07-05:00 List-Id: >Lao Xiao Hai wrote: > > As I recall, the discussion had something to do with unreliable > expectations with regard to overloading the equality operator. The (wrong) expectation that I was presenting, was that of expecting the redefined "=" to be the "=" that would be used in a generic that imported a private type _and_utilized_ the implicitely imported "=". The point was not that a screwy "=" could be defined for a private type in Ada 95 - but that an Ada 83 generic could depend on the fact that it would be getting the "=" that an instantiator expected it to get. (If predefined "=" did not produce the approriate results for his ADT then the designer of the type being used in the instantiation would have taken it away by making the type limitted private and as a result, that type would not have been able to have been used as the actual type in the instantiation.) Now in Ada 95, someone might think "hey! instead of making my ADT (whose predefined "=" does not exhibit the desired semantics) be limitted private I can simply override "=" and then be able to use my ADT in instances of that old Ada 83 generic code that imports a private type. Kewl!" But we know that his instance will not work as he expects; yes, the instantiation will compile but the (he thinks) overriding "=" that he define is not used in the instance, predefined "=" is!