comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Predefined equality, reemergence
Date: Tue, 4 Apr 2006 18:00:54 -0500
Date: 2006-04-04T18:00:54-05:00	[thread overview]
Message-ID: <J86dnfd4ibI8Z6_ZnZ2dnUVZ_vmdnZ2d@megapath.net> (raw)
In-Reply-To: 1144179981.495938.321410@e56g2000cwe.googlegroups.com

"Adam Beneschan" <adam@irvine.com> wrote in message
news:1144179981.495938.321410@e56g2000cwe.googlegroups.com...
> I wrote:
> > Hi, everyone,
> >
> > I'm having trouble understanding how the language rules about
> > predefined equality, specifically 4.5.2(24), behave when the component
> > type involved may be seen as "tagged" or "untagged" depending on
> > whether you're inside an instance...........
>
> I mistakenly posted this before thoroughly checking the AI's.  I found
> that AI-123 appears to address this question.  I've been looking over
> this AI and I still don't know the answer to my question.

I don't think AI-123 covers quite the same question. But let me take a quick
stab at it.

If in doubt, generics in Ada follow a substitution model; that is, the
result is the same if you wrote a non-generic equivalent. As such, I
certainly would not expect "=" (or anything else for that matter) to behave
differently depending on the location of the call. After all, you have a
*real* subprogram "=" (as opposed to an implicit one), and that subprogram
is going to have only one body of code.

Now, it might be interesting to find language rules to back up this
conclusion. :-) Personally, I find this as a case of Dewar's Rule (the
standard doesn't mean to say anything stupid, even if the actual words can
be read to come to a stupid conclusion). I'll leave finding wording as an
exercise for someone else...

                                       Randy.





  reply	other threads:[~2006-04-04 23:00 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 [this message]
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
replies disabled

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