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,LOTS_OF_MONEY autolearn=ham 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-12 10:45:15 PST From: "Martin Dowie" Newsgroups: comp.lang.ada References: <3BECA3B7.5020702@telepath.com> <3bef920f@pull.gecm.com> <9soq34$be6$1@nh.pace.co.uk> Subject: Re: List container strawman 1.2 Date: Mon, 12 Nov 2001 18:39:13 -0000 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 NNTP-Posting-Host: ed125012.sd.edinbr.gmav.gecm.com Message-ID: <3bf013e4$1@pull.gecm.com> X-Trace: 12 Nov 2001 18:24:36 GMT, ed125012.sd.edinbr.gmav.gecm.com Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!dispose.news.demon.net!demon!btnet-peer0!btnet-feed3!btnet!newreader.ukcore.bt.net!pull.gecm.com!ed125012.sd.edinbr.gmav.gecm.com Xref: archiver1.google.com comp.lang.ada:16352 Date: 2001-11-12T18:39:13+00:00 List-Id: "Ted Dennison" wrote in message news:NLTH7.21885$xS6.33661@www.newsranger.com... > In article <9soq34$be6$1@nh.pace.co.uk>, Marin David Condic says... > > > >Lots of ways of handling that. I agree that there are cases where you want a > >list to contain only one sample of a given element, but I'd prefer that the > >instantiation doesn't force someone to make that decision and have to > >provide parameters that may be unnecessary for the simple cases. It could > > Agreed. > > After a sort it should be pretty easy to identify (and then remove) dups. I'm > not sure if its a common enough need to merit its own routine. I suppose a > dup-removing sort could be introduced (as well as an Insert_Sorted_Unique that > raises an exception for a Dup, or somesuch). Perhaps after enough of these, we'd > have good material for Ehud's child package. :-) Why 'after a sort'? The point would be to not let anyone insert duplicates in the first place! Hmmm, a child package though... I'll have a think and see if there is a nice why to do it like that. It could just be the applications I've used list in (and I do like a list ;-) but almost all I can think of do require no duplicates...