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-20 04:50:23 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.gamma.ru!Gamma.RU!peer.news.eu-x.com!server2.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: Tue, 20 Nov 2001 10:43:27 +0000 Organization: University of Brighton Message-ID: <3BFA33CF.7D840CCA@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> NNTP-Posting-Host: pc2je.it.bton.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: saturn.bton.ac.uk 1006256504 17763 193.62.183.154 (20 Nov 2001 11:41:44 GMT) X-Complaints-To: news@bton.ac.uk NNTP-Posting-Date: 20 Nov 2001 11:41:44 GMT X-Mailer: Mozilla 4.7 [en-gb] (Win95; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:16715 Date: 2001-11-20T11:41:44+00:00 List-Id: Ted Dennison wrote: > >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. No, you misunderstand me. The iterators I developed in my book weren't safe in this sense, but they were more like pointers than array indexes. Your strawman proposal has you passing a list and an index as two separate (and hence seperable) components, like passing "My_Array" and "I" as two separate components to represent "My_Array(I)". This is perhaps sensible for arrays, where I could be an index into several arrays, but for a list I feel that pointer-style semantics (the iterator refers to point I in list X) is more sensible. There is also a universal "null pointer" value. ----------------------------------------------------------------- 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 -----------------------------------------------------------------