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,f5142427a147e149 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!q2g2000cwa.googlegroups.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: Equivalent keys/elements in Ada.Containers Maps and Sets Date: 24 Jan 2007 14:50:17 -0800 Organization: http://groups.google.com Message-ID: <1169679017.011443.231540@q2g2000cwa.googlegroups.com> References: <45b60602$0$24602$39db0f71@news.song.fi> <1169567122.501077.189450@s48g2000cws.googlegroups.com> <45b69499$0$31527$39db0f71@news.song.fi> <1169657427.881916.284570@l53g2000cwa.googlegroups.com> <1169674043.880430.199350@j27g2000cwj.googlegroups.com> NNTP-Posting-Host: 66.162.65.129 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1169679034 32026 127.0.0.1 (24 Jan 2007 22:50:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 24 Jan 2007 22:50:34 +0000 (UTC) In-Reply-To: <1169674043.880430.199350@j27g2000cwj.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: q2g2000cwa.googlegroups.com; posting-host=66.162.65.129; posting-account=Zl1UPAwAAADEsUSm1PMMiDjihtBlZUi_ Xref: g2news2.google.com comp.lang.ada:8521 Date: 2007-01-24T14:50:17-08:00 List-Id: On Jan 24, 4:27 pm, "Adam Beneschan" 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.)