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-05 10:08:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjcppf01.usenetserver.com!usenetserver.com!news-west.rr.com!lsnws01.we.mediaone.net!typhoon.san.rr.com!not-for-mail Message-ID: <3BE6D5C3.E5F33DF5@san.rr.com> From: Darren New Organization: Boxes! X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; 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> <3BE5BF56.582AD0AB@acm.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 05 Nov 2001 18:09:22 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: typhoon.san.rr.com 1004983762 66.75.151.160 (Mon, 05 Nov 2001 10:09:22 PST) NNTP-Posting-Date: Mon, 05 Nov 2001 10:09:22 PST Xref: archiver1.google.com comp.lang.ada:15830 Date: 2001-11-05T18:09:22+00:00 List-Id: Jeffrey Carter wrote: > > 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. OK. Maybe it's because I'm not well-experienced in Ada, but passing the same parameter twice just to make sure the programmer passes the same parameter twice seems kind of odd to me. > Note that positions are not iterators. They do not iterate. Client code > may use them for iteration, but that does not make them iterators. Yes, but they're *declared* as "Iterator". I know they're not iterators. That's why my version calls em "Location". :-) -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. Sore feet from standing in line at airport security checkpoints: Jet Leg.