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,93ab7fc5388e249 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-06 06:50:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <3C0E1FA1.45A38A75@brighton.ac.uk> <%7sP7.49836$xS6.82296@www.newsranger.com> Subject: Iterator approach (was: List container strawman 1.3) 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: Thu, 06 Dec 2001 09:50:10 EST Organization: http://www.newsranger.com Date: Thu, 06 Dec 2001 14:50:10 GMT Xref: archiver1.google.com comp.lang.ada:17507 Date: 2001-12-06T14:50:10+00:00 List-Id: In article , Mark Lundquist says... >In the access discriminator way, any state of affairs that could give rise >to a dangling iterator results in a compile-time error, and the safety comes >at no added run-time expense. The chained iterator approach results in a I don't think that's true at all. Suppose I have the following (using your example): type List_Ptr is access My_Lists.List; type Iterator_Ptr is access My_Lists.Iterator; function Free is new Unchecked_Deallocation (My_Lists.List, List_Ptr); function Free is new Unchecked_Deallocation (My_Lists.Iterator, Iterator_Ptr);