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 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-23 18:41:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!server3.netnews.ja.net!newshost.central.susx.ac.uk!news.bton.ac.uk!not-for-mail From: John English Newsgroups: comp.lang.ada Subject: Re: List container strawman 1.2 Date: Sat, 24 Nov 2001 00:27:44 +0000 Organization: University of Brighton Message-ID: <3BFEE980.487C4CAD@brighton.ac.uk> References: <3BECA3B7.5020702@telepath.com><3BF0247D.4500975E@san.rr.com><5BXH7.22252$xS6.34813@www.newsranger.com><3BF052D3.ECEF3FF2@san.rr.com><3BF19FF8.7FE097EF@boeing.com><3BF27410.C899A16B@brighton.ac.uk><3BF3EDE5.FE0ED701@brighton.ac.uk> <700ht9.6k1.ln@127.0.0.1> <9tht9a$2j1ni$1@ID-25716.news.dfncis.de> <3piL7.34607$xS6.59455@www.newsranger.com> NNTP-Posting-Host: dialin-b6.bton.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: saturn.bton.ac.uk 1006561361 6100 194.81.199.186 (24 Nov 2001 00:22:41 GMT) X-Complaints-To: news@bton.ac.uk NNTP-Posting-Date: 24 Nov 2001 00:22:41 GMT X-Mailer: Mozilla 4.7 [en-gb] (Win98; U) X-Accept-Language: en,pdf Xref: archiver1.google.com comp.lang.ada:16919 Date: 2001-11-24T00:22:41+00:00 List-Id: Ted Dennison wrote: > > In article <9tht9a$2j1ni$1@ID-25716.news.dfncis.de>, Nick Roberts says... > > > >My approach to solving the problem of 'safe pointers' is to have the > >'pointers' (I call them 'cursors') inside the list type. This way they can > >be checked by any list operation for validity (and internally updated as > >necessary), and they can be referenced by number (1, 2, 3, etc.) for maximum > >simplicity. > > I find that solution slightly inferior, as it only allows one iterator at a > time, whereas the other one allows as many as you want. Well, N for some finite N since: > they can be referenced by number (1, 2, 3, etc.) ...but then you still have the same disadvantages (for cursors) as using an array for a variable size data structure (you preallocate cursors pessimistically, but you are occasionally disappointed even so). ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.comp.it.bton.ac.uk/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------