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-12 17:29:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!ppp-1-18.cvx6.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: List container strawman 1.2 Date: Tue, 13 Nov 2001 00:55:17 -0000 Message-ID: <9spt1k$14snic$4@ID-25716.news.dfncis.de> References: <3BECA3B7.5020702@telepath.com> <9sjf4n$odm$1@news.huji.ac.il> <3mcH7.20046$xS6.32571@www.newsranger.com> <3BED7AFD.737C2AE9@nbi.dk> <3BEFFCAE.DCB5D136@nbi.dk> NNTP-Posting-Host: ppp-1-18.cvx6.telinco.net (212.1.156.18) X-Trace: fu-berlin.de 1005614964 38690380 212.1.156.18 (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:16383 Date: 2001-11-13T00:55:17+00:00 List-Id: "Jacob Sparre Andersen" wrote in message news:3BEFFCAE.DCB5D136@nbi.dk... > Ted: Dennison wrote: > > > In article <3BED7AFD.737C2AE9@nbi.dk>, Jacob Sparre Andersen says... > > > >Isn't that only if the "index" is external to the list type? > > > > I'm not sure what you think the alternative would be. Perhaps each list gets one > > and only one active iterator, whose current value is somehow a facet of the list > > itself? > > Something like that. Not necessarily only one though. That > would also help making sure that the iterator used actually > matches the list. This is what my new proposal is based on: a 'cursor' (only one) is built into each list object. This approach solves all the problems of implementational inefficiency, extra memory use, and safety issues. I assume most algorithms would only need one cursor. Are there going to be occasions when more than one cursor (at a time) might be needed? -- Best wishes, Nick Roberts