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,e382b50ddc696050 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-10 08:10:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sunqbc.risq.qc.ca!falcon.america.net!eagle.america.net.POSTED!not-for-mail Message-ID: <3C14DE74.90B6C938@otelco.net> From: Larry Hazel X-Mailer: Mozilla 4.78 [en] (Win98; U) X-Accept-Language: en,x-ns11F8K63r3NhQ,x-ns2r2e09OnmPe2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: List Strawman JC01 References: <3C0DB9D0.7184868A@acm.org> <3C0EB851.77E7172A@boeing.com> <3C0FAF78.6F006DF7@boeing.com> <9v2ks4$ltm$1@nh.pace.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 10 Dec 2001 10:10:28 -0600 NNTP-Posting-Host: 66.0.32.230 X-Trace: eagle.america.net 1008000622 66.0.32.230 (Mon, 10 Dec 2001 11:10:22 EST) NNTP-Posting-Date: Mon, 10 Dec 2001 11:10:22 EST Organization: 24hoursupport.com Xref: archiver1.google.com comp.lang.ada:17678 Date: 2001-12-10T10:10:28-06:00 List-Id: Marin David Condic wrote: > > 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. > > Or we could use This_End and That_End :-) If we use First, Last, Next, and Prior, we could provide a procedure to switch the meanings. Larry