comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Predefined equality, reemergence
Date: 05 Apr 2006 18:01:19 -0400
Date: 2006-04-05T18:01:19-04:00	[thread overview]
Message-ID: <wcclkuju1g0.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 1144262837.486161.27060@i39g2000cwa.googlegroups.com

"Adam Beneschan" <adam@irvine.com> 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



      reply	other threads:[~2006-04-05 22:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-04 19:30 Predefined equality, reemergence Adam Beneschan
2006-04-04 19:46 ` Adam Beneschan
2006-04-04 23:00   ` Randy Brukardt
2006-04-04 23:57     ` Adam Beneschan
2006-04-05 12:16       ` christoph.grein
2006-04-05 18:47         ` Adam Beneschan
2006-04-05 22:01           ` Robert A Duff [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox