comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: Equivalent keys/elements in Ada.Containers Maps and Sets
Date: 24 Jan 2007 14:50:17 -0800
Date: 2007-01-24T14:50:17-08:00	[thread overview]
Message-ID: <1169679017.011443.231540@q2g2000cwa.googlegroups.com> (raw)
In-Reply-To: <1169674043.880430.199350@j27g2000cwj.googlegroups.com>



On Jan 24, 4:27 pm, "Adam Beneschan" <a...@irvine.com> wrote:
>
> ... then they scratch their heads trying to figure out why
> things aren't working, and eventually they go berserk and vow never to
> code in anything besides C ever again.

This is a silly argument.  The Ada container library is modeled on the
C++ STL, and in that library the requirement for "strict weak ordering"
for the binary predicate for ordered associative containers is clear.

Whatever putative difficulties Ada programmers have defining a
less-than operator for instantiating a generic container, that is no
different from the same problems C++ programmers would have defining a
binary predicate for instantiating a container template.  Yet somehow,
some way, thousands of C++ programmers have managed to instantiate
their container templates without any problems.  I hope you're not
suggesting that C++ programmers are smarter than Ada programmers!

Ambiguities in the Ada RM happen all the time, that's why we have an
ARG.   There's nothing special about (assumed) ambiguity in the
requirement for strict weak ordering.

(And besides, even if the RM doesn't say so, what's the alternative?
If you define a less-than operator for which equivalence is not
transitive, then the container won't work.  It's not as if there's a
competing RM interpretation what could make it otherwise.)




  reply	other threads:[~2007-01-24 22:50 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
2007-01-24 21:27           ` Adam Beneschan
2007-01-24 22:50             ` Matthew Heaney [this message]
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