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,461276586f65363c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Predefined equality, reemergence Date: 05 Apr 2006 18:01:19 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1144179013.753791.169830@u72g2000cwu.googlegroups.com> <1144179981.495938.321410@e56g2000cwe.googlegroups.com> <1144195041.057113.231640@t31g2000cwb.googlegroups.com> <1144239394.052533.214270@t31g2000cwb.googlegroups.com> <1144262837.486161.27060@i39g2000cwa.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1144274479 22494 192.74.137.71 (5 Apr 2006 22:01:19 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 5 Apr 2006 22:01:19 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:3733 Date: 2006-04-05T18:01:19-04:00 List-Id: "Adam Beneschan" writes: > christoph.grein@eurocopter.com wrote: > > So the result is: For tagged types (whether visibly tagged or not), > > predefined equality when overridden is lost forever. That's correct. > Anyway, I can understand your statement that when an overriding "=" is > provided for a tagged type, the predefined "=" may no longer reemerge. I'm too lazy to dig in the RM right now, but I think what you're missing is that the predefined "=" for a tagged type is _defined_ to do the user-defined thing. So you shouldn't talk about the predefined "=" reemerging, when you mean something like the bit-wise operator reemerging. And I believe the rules are written so that it doesn't matter whether the type is _visibly_ tagged. An untagged private type whose full type is tagged has properly-composing "=". And generics are like "inside-out" packages, so a generic formal untagged type has properly-composing "=" if the actual type is tagged. > I'm prepared to accept that this is just an omission in the RM, ... I don't think the RM gets this wrong, but of course I could be mistaken. >...and > that the predefined "=" never reemerges for tagged types. Again, you mean the bit-wise operator. >... That would > satisfy me; it answers my original question and convinces me that the > output of my example should be TRUE in both cases. I believe it should be TRUE in both. By the way "bit-wise" isn't quite right, either, since minus-zero and plus-zero are supposed to be equal for floating point types with signed zeros. - Bob