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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7ee10ec601726fbf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-01 10:10:44 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: why not Date: Thu, 1 Nov 2001 12:15:28 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9rrvvh$d16$1@nh.pace.co.uk> References: <3BC5D730.DA950CC7@boeing.com> <9q4pa7$1ad$1@nh.pace.co.uk> <3BC6ACC8.23EF21BC@free.fr> <3BC71F54.1FFE78FA@boeing.com> <1KGx7.26476$ev2.35117@www.newsranger.com> <3BC7AD82.2A0CCCD4@acm.org> <9qhiqr$af0$1@nh.pace.co.uk> <1nDC7.180$6S7.92255364@newssvr11.news.prodigy.com> <9rjsak$bp3$1@nh.pace.co.uk> <9rmhb9$o1b$1@nh.pace.co.uk> <3BDEF0FE.B55FED9E@san.rr.com> <9rmuqi$es$1@nh.pace.co.uk> <3BDF1F13.4B99361C@san.rr.com> <9rnbtv$5i4$1@nh.pace.co.uk> <3BE03E54.57E0E6C8@san.rr.com> <3BE0F8AE.3B7E5C70@home.com> <9rroi6$9rs$1@nh.pace.co.uk> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1004634929 13350 136.170.200.133 (1 Nov 2001 17:15:29 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 1 Nov 2001 17:15:29 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:15563 Date: 2001-11-01T17:15:29+00:00 List-Id: "Matthew Heaney" wrote in message news:tu2t7oiig3e9d9@corp.supernews.com... > > If you need to traverse backwards, you need a doubly-linked list. > Obviously. Just an observation that a singly linked list would save the overhead of extra pointers and many structures (stacks, single-ended-queues) might benefit from the lack of the extra pointer. However, in most instances, I'd think that the extra pointer overhead would be small enough that you might just as well have it there plus all the operations you *don't* need for a simple stack, just because then you've got a single package that does the whole job. > Of course, the STL has std::slist, which is a singly-linked list. There > wouldn't be any harm in including that in the library too. > Yes there would. Start working through all the combinations of stuff that are being proposed: (((Single List/Double List) * (Sorted/Unsorted)) + Map) * (Bounded/Unbounded) * (Task Safe/Task Unsafe) Thats 20 variants right there. We can easily envision other variants such as Private/Limited-Private or Inherited/Generic. That's 80. The problem is to get the number of variants down to some manageable level that covers some reasonable amount of turf and will satisfy the largest possible body of users. Too many variants makes it a) complex and b) unlikely to be realized. That's why I would suggest limiting the first cut to a Double List (Sorted/Unsorted) & Map of Unbounded, Task Unsafe variety. That gets you down to 3 key packages that would probably cover a large percentage of the uses. 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/