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,e382b50ddc696050 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-10 07:57:10 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 Strawman JC01 Date: Mon, 10 Dec 2001 10:37:38 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9v2ks4$ltm$1@nh.pace.co.uk> References: <3C0DB9D0.7184868A@acm.org> <3C0EB851.77E7172A@boeing.com> <3C0FAF78.6F006DF7@boeing.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1007998660 22454 136.170.200.133 (10 Dec 2001 15:37:40 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 10 Dec 2001 15:37:40 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:17676 Date: 2001-12-10T15:37:40+00:00 List-Id: I don't have an objection to arbitrarily tacking a name on both ends - "Front" and "Back" are useful, but still kind of arbitrary. Why is one door on your house a "Front" door and another the "Back" door? I use the "Back" door of my house far more frequently than the "Front" door - so in a sense it is more "Primary". Similarly, "First" and "Last" are kind of arbitrary, yet still acceptable designations for ends of a doubly linked list. For that matter, we could use "Left" and "Right" and rather arbitrarily decide that those concepts will relate in some sense to the scanning of the list as if it were text. The end you "Push" onto is the "Left" end and the end you "Enqueue" onto is the "Right" end. Or arbitrarily, we could imagine the list as vertical and use "Top" and "Bottom". I think that the end-user of the list is going to be the one to impose some meaning on the direction or ends of the list. If the application has some sort of visual presentation then there may be some sense in which the ends are going to be "Top" or "Bottom" or "Left" or "Right". Pick something and don't worry too much that it isn't the perfect representation of the abstract concept. I'd vote for being consistent with the nomenclature in Ada.Strings.* just so that the end user doesn't have to keep switching mental contexts when changing the data structures he's working with. There might even be advantages to using the same enumeration types to avoid needless proliferation of otherwise identical enumerals. Or, for Cat In The Hat fans, we could name the ends "Thing 1" and "Thing 2". :-) 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:uV4Q7.52774$xS6.86977@www.newsranger.com... > > The answer of course is that you *can't*. What we have here is a truly > direction-neutral structure. We could always go "eeny-meeny-miny-mo" and pick > one of course. But just because we did that doesn't suddenly make a directional > bias inherent in the data structure. Its something the user imposes, and its > there only in as much as the user believes in it and adheres to it. > > I'd like to hear from one of the instructors in the audience about this. After > all, you are the ones who have to teach students data structures using this > thing. >