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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no 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-19 09:59:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison 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> Subject: Re: List container strawman 1.2 Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 19 Nov 2001 12:59:14 EST Organization: http://www.newsranger.com Date: Mon, 19 Nov 2001 17:59:14 GMT Xref: archiver1.google.com comp.lang.ada:16696 Date: 2001-11-19T17:59:14+00:00 List-Id: In article <3BF3EDE5.FE0ED701@brighton.ac.uk>, John English says... (good stuff all) > >Iterator is nice too but instantiating the generic (and wrapping the >operation in an approapriately-shaped procedure first) is probably >more hassle than a while I <> Last(L) loop, IMHO... That's my feelings on it too. Additionally, I've found you have to use globals in the routine to get all of your real work done, which rubs the wrong way against about 13 years of training on my part. But there are those here who swear by passive iterators. >another one I might one would be Shuffle, which is about the same >level of difficulty... maybe a generalisation such as Swap(Index,Index) >might be a useful building block for algorithms of this sort. I suppose. That would let someone write themselves a Bogo-sort if they really want to. >I also think that an Index needs to know which list it refers to, .. 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. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.