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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, LOTS_OF_MONEY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a644fa9cd1a3869a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-14 07:45:06 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Map container (was: List container: Insert and Delete) Date: Wed, 14 Nov 2001 10:07:12 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9su1al$lfl$1@nh.pace.co.uk> References: <9sn4qm$13g29j$2@ID-25716.news.dfncis.de> <9sok8i$142am0$2@ID-25716.news.dfncis.de> <3BF004F4.F74AE461@boeing.com> <9sp5up$g5o$1@nh.pace.co.uk> <3BF0827A.DCF2213C@acm.org> <9sra40$b8p$1@nh.pace.co.uk> <5DaI7.23016$xS6.35866@www.newsranger.com> <3BF14752.B3F3FBC@boeing.com> <9srv70$k0k$1@nh.pace.co.uk> <9egI7.23469$xS6.37348@www.newsranger.com> <9ss3uv$m09$1@nh.pace.co.uk> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1005750421 22005 136.170.200.133 (14 Nov 2001 15:07:01 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 14 Nov 2001 15:07:01 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:16510 Date: 2001-11-14T15:07:01+00:00 List-Id: Sure, but the "treeness" of the implementation is not something the caller ever sees - or needs to see - or should see. I like the notion of using a Map if you want sorted elements - but I'm not sure you wouldn't want to provide some kind of "Insert_Aascending" (or other technique) on a simple list. If you posit that there will be usages for a list that will be rather primitive - a list of integers or floats, for example - you might want them sorted and a Map would start looking like a lot of overhead - as well as being awkward. Right now, I'd settle for a basic, unsorted list of private data items and a sorted map for key/record kinds of things. That would take care of probably 70% of the usage. Getting a sorted list as an extension/variant would probably pick up another 10% to 20% of the usage. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Ted Dennison" wrote in message news:mZgI7.23571$xS6.37495@www.newsranger.com... > > To speed lookup on the map keys, it makes sense to me to use a binary search > tree. That also implies that the sorted ordering (forward or back) would always > be available, and would probably be gone through anyway when iterating. > > For this reason, I think putting a lot of special sorting capability into the > List structure would be overkill. If you need it kept sorted on some key, just > use a map instead. >