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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ac39a12d5faf5b14 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-25 05:30:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.netcologne.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Grace and Maps (was Re: Development process in the Ada community) Date: Thu, 25 Apr 2002 12:30:10 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <3CB46975.90408@snafu.de> <4519e058.0204180800.44fac012@posting.google.com> <3CBF0341.8020406@mail.com> <4519e058.0204190529.559a47ae@posting.google.com> <3CC1C6B3.6060306@telepath.com> <3CC21747.5000501@telepath.com> <3CC59ED2.1000803@home.com> <3CC5B286.6FE61551@san.rr.com> <3CC5B9EE.32F3060@san.rr.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1019737810 27259 134.91.4.34 (25 Apr 2002 12:30:10 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Thu, 25 Apr 2002 12:30:10 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:23103 Date: 2002-04-25T12:30:10+00:00 List-Id: Marin David Condic wrote: : My guess is that the best solution is to pick : one that will handle the general cases needed for maps reasonably well and : that will be easy to implement and move on. No I don't think the general case arguement is really helpful here. The following is possible and desirable with the existing libraries (probably not just in my view since it is essentially about ADTs, isn't it): You declare you want a map, pick the right one for your purpose at declaraion or initialisation time but then shut that choice away, hide it from sight. A decision to be made per program part, essentially at (re)declaration, and _not_ anywhere else. A la box: map := some_impl.create(...); : I certainly have no objection to providing alternate structures that offer : different performance benefits, but the important thing is to get a general : solution available that will work well enough for most of the programmer's : needs. Wouldn't you want, in a language like Ada, the programmer to be able to choose an appropriate specific map implementation and use that for the real thing behind a declared map, and _then_ FORGET about it most of the time. No need to think about the general solution, because you will still be writing programs AS IF there is a general solution, namely by using an interface, the Map interface. And if there _is_ a standardised Map interface, implementors, producers, vendors can glue their specific implemention(s) to that interface, and you as a programmer will still be writing essentially portable code, since only the few lines where a specific container that offers the Map interface is chosen. Reading this thread, I start wondering whether the existing libraries have been studied as a rich source of ideas? For example, the most recent addition (afair), Charles, demonstrates Red-Black trees for containers, Simon's BCs are full of information about topics covered in this thread, GNAT.* also adds a wealth of implemention ideas, ... But I start sounding like I don't want to. --georg