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-13 08:16:24 PST Path: archiver1.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: List container: Insert and Delete Date: Tue, 13 Nov 2001 10:28:35 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9sre75$cuq$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> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1005665317 13274 136.170.200.133 (13 Nov 2001 15:28:37 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 13 Nov 2001 15:28:37 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:16416 Date: 2001-11-13T15:28:37+00:00 List-Id: If you had an abstract tagged list type that defined behavior common to *all* lists (unbounded, bounded, unsorted, sorted, etc,) you could just add the operations that make sense for the particular type of list. I don't know that it has to be a tagged type - just create different packages that have somewhat different features where it makes sense. I'd take a cue from Ada.Strings.* since this is the "flavor" of things in Ada. The packages are similar, but not identical. Operations exist only if they make sense for the particular type of string and are not always identical since different types of strings need different parameters to operations. If you think about it, Strings are not all that different from Lists, so to whatever extent we can get orthogonality between the two package sets, the more familiar they will appear to be to your average Ada programmer. (You can change the names so you won't have ASCL.Lists.Unbounded.Unbounded_List if you like :-) 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:5DaI7.23016$xS6.35866@www.newsranger.com... > > I'd agree with this. The only compelling reason I could see for it would be if > we were using some kind of root tagged type to implement both (which we aren't), > and wanted to allow for dynamic dispatching on classwide list pointers. > > I'm curious what people think about the extent of the compatability they should > have though. Should the look mostly alike, except for routines that don't make > sense in that context? Should we remove all basic-looking routines from either > implementation with time behavior >=O(N). Should the interface for bounded be > completely redesigned around things that you can do with bounded implementations > that you can't easily do with unbounded ones? > > Personally, I think I'm leaning towards the middle-of-the road option, but its > not a strong leaning. >