comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Equivalent keys/elements in Ada.Containers Maps and Sets
Date: Wed, 24 Jan 2007 15:18:39 -0600
Date: 2007-01-24T15:18:39-06:00	[thread overview]
Message-ID: <v6udnRmVuOpGUSrYnZ2dnUVZ_h-vnZ2d@megapath.net> (raw)
In-Reply-To: 1169657427.881916.284570@l53g2000cwa.googlegroups.com

"Matthew Heaney" <mheaney@on2.com> wrote in message
news:1169657427.881916.284570@l53g2000cwa.googlegroups.com...
> On Jan 23, 7:43 pm, "Randy Brukardt" <r...@rrsoftware.com> wrote:
...
> > No, Matt is just reasoning from what he'd like to be true, not what the
RM
> > implies. You'll note he didn't give any RM paragraph references.
>
> Because I was using the Dewar Rule.

I don't think anyone doubts what the rules ought to mean here. The question
was whether the RM actually requires that.

The Dewar rule doesn't mean that we can ignore errors/omissions in the RM,
it simply lowers the priority of fixing them (and lets us fix them in a
Corrigendum rather than an Amendment).

> > I don't believe Matt was referring in any way to the actual
> > wording of the RM. I don't see any wording that would require any
> > relationship between "=" and Equivalent_Elements, and this is needed.
>
> It cannot be any other way, for the reason I gave above.

But that's irrelevant to whether or not the RM states it. And sooner or
later, someone will find some clever way to "use" the mistake, and then
claim that their implementer doesn't implement the standard properly.

> > Nothing is "implied" by the RM. Please explain how you think that these
> > issues are covered by the RM wording, as opposed to what we intended the
RM
> > to say.
>
> In the case of ordered associative containers, the less-than operator
> must define a "strict weak ordering".  That's the most succinct
> statement of the precondition, since that term has a precise definition
> in discrete mathematics.
>
> With respect to the requirement that equality implies equivalence, I
> would argue that that requirement already ennunciated by existing
> wording (though I suppose an AARM note wouldn't hurt anything).
>
> I'm a pragmatist in these matters.  No matter what the RM says (or
> doesn't say), the developer has all the incentive he needs to do the
> right thing.  If he doesn't do the right thing, then his program simply
> won't work...

That probably is the correct approach for a user (I can't see why anyone
would want to ignore the obvious intent). It's not the correct approach for
the actual RM, and it's questionable for the implementer of the containers
(it's better to get errors and omissions fixed, than just ignoring them.
Else you will have users than don't understand the intent and they could
claim your implementation is wrong).

                                    Randy.





  reply	other threads:[~2007-01-24 21:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-23 12:56 Equivalent keys/elements in Ada.Containers Maps and Sets Niklas Holsti
2007-01-23 15:45 ` Matthew Heaney
2007-01-23 16:47   ` Matthew Heaney
2007-01-23 23:04   ` Niklas Holsti
2007-01-24  0:43     ` Randy Brukardt
2007-01-24  7:52       ` Niklas Holsti
2007-01-24 21:06         ` Randy Brukardt
2007-01-24 16:50       ` Matthew Heaney
2007-01-24 21:18         ` Randy Brukardt [this message]
2007-01-24 21:27           ` Adam Beneschan
2007-01-24 22:50             ` Matthew Heaney
2007-01-25  2:22               ` Adam Beneschan
2007-01-26  0:08                 ` Georg Bauhaus
2007-01-24 20:56       ` Adam Beneschan
2007-01-24 20:57         ` Adam Beneschan
2007-01-24 22:56         ` Matthew Heaney
2007-01-25  0:44           ` Randy Brukardt
2007-01-24 16:11     ` Matthew Heaney
2007-01-24 18:12       ` Niklas Holsti
replies disabled

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