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,842accb6a7d76669 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-04 14:21:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!crtntx1-snh1.gtei.net!lsanca1-snf1!news.gtei.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3BE5BF56.582AD0AB@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: List container strawman 1.1 References: <3BE301D1.4010106@telepath.com> <3BE31DD5.FF96AFE0@san.rr.com> <3BE43E6D.109111F4@acm.org> <3BE591CB.72F76462@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sun, 04 Nov 2001 22:21:24 GMT NNTP-Posting-Host: 209.86.204.248 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1004912484 209.86.204.248 (Sun, 04 Nov 2001 14:21:24 PST) NNTP-Posting-Date: Sun, 04 Nov 2001 14:21:24 PST Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Sun, 04 Nov 2001 14:17:20 PST (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:15774 Date: 2001-11-04T22:21:24+00:00 List-Id: Darren New wrote: > > My thought was that it would be better to keep a pointer to the list in > the "iterator". That is, each iterator can only refer to one list > (except for the "off the end" iterator which I feel is a bad design > here), so why not? Yes, the Position includes information that identifies the list, and operations make sure it matches the list supplied. If they don't match, the client has made an error and is notified via an exception. It is never possible to supply the right list and the wrong position, or the wrong list and the right position, and have an operation succeed. Note that positions are not iterators. They do not iterate. Client code may use them for iteration, but that does not make them iterators. -- Jeff Carter "You cheesy lot of second-hand electric donkey-bottom biters." Monty Python & the Holy Grail