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,a644fa9cd1a3869a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-22 01:34:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!ppp-1-26.cvx1.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: List container strawman 1.2 Date: Thu, 22 Nov 2001 03:01:05 -0000 Message-ID: <9tht9a$2j1ni$1@ID-25716.news.dfncis.de> 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> NNTP-Posting-Host: ppp-1-26.cvx1.telinco.net (212.1.136.26) X-Trace: fu-berlin.de 1006401643 2721522 212.1.136.26 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:16834 Date: 2001-11-22T03:01:05+00:00 List-Id: 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 hope to get my new proposal (V5) on my web site ASAP. As for iteration as such, it's usefulness goes far beyond "it's easier to have a while loop" or the like. More on this later. I've taken the liberty of adding Robert's web page to my links. -- Best wishes, Nick Roberts wrote in message news:700ht9.6k1.ln@127.0.0.1... > In article , Ted Dennison wrote: > > snip... > > > > We've been down that road. The place it leads is that if you want safe > > iterators, you have to make both the indices and the lists controlled and keep a > > little mini-list of iterators in each list. The algorithms for doing this > > properly aren't unachieveable, but they do make everything quite a bit more > > complex. They also create a situation where real-time users will have to be a > > lot more careful when they iterate through a list to aviod heap operations. > > > > The current version takes the opposite stance. I'm wavering quite a bit in my > > support for it though. > > > > An implementation of a list that uses 'safe' iterators is now > available on: > > http://homepage.ntlworld.com/ramatthews > > I have also asked David Bottom to hold a copy on AdaPower. > > Robert A. Matthews