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,ebbca47c76670bb2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-31 18:30:55 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3D488F3D.6186@earthlink.net> From: Vincent Marciante X-Mailer: Mozilla 2.02 (OS/2; I) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Reemergence of predefined equality operator... References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 01 Aug 2002 01:30:57 GMT NNTP-Posting-Host: 65.178.16.126 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1028165457 65.178.16.126 (Wed, 31 Jul 2002 18:30:57 PDT) NNTP-Posting-Date: Wed, 31 Jul 2002 18:30:57 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:27552 Date: 2002-08-01T01:30:57+00:00 List-Id: Robert A Duff wrote: > If you wanted to drive a stake through the heart of the predefined "=" > by declaring a user-defined "=", so that every time objects of type T > are compared for equality it will call the user-defined "=", then you > lose -- if you pass T to a generic or wrap T in a record, the predefined > "=" reemerges (rises from the dead). > > For "=", this seems "obviously" wrong. But as I pointed out elsewhere, > the situation for other operators (eg, "mod"), is not so obvious. > Even if the language were changed, or even if Text_IO.Integer_IO took > "mod" as an "is <>" parameter as above, it's not clear (to me) what the > right answer is. The crux of the problem in this specific case (generic private types) seems to me to be _not_ reemergence but actually the new (Ada 95) permission to override predefied "=". (Allowing the definition of "=" with a non-boolean result does not seem to be a problem.) If overriding of predefined "=" was disallowed in the future (not practical?) wouldn't that solve the problem well? Is that really really not practical? Vincent Marciante