From: Ted Dennison<dennison@telepath.com>
Subject: Re: Iterator approach (was: List container strawman 1.3)
Date: Thu, 06 Dec 2001 16:19:18 GMT
Date: 2001-12-06T16:19:18+00:00 [thread overview]
Message-ID: <aUMP7.51429$xS6.84770@www.newsranger.com> (raw)
In-Reply-To: CALP7.51313$xS6.84388@www.newsranger.com
In article <CALP7.51313$xS6.84388@www.newsranger.com>, Ted Dennison says...
>
>In article <DxyP7.309$w85.20109@rwcrnsc54>, 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);
Damn. Got cut off again.
The idea here is that I dynamicly allocate both the list and an associated
iterator, then use Free to deallocate only one of them. I don't believe the
compiler would give that code any error, and I end up having a pointer to
nowhere that the List facility has no way to detect. Not "safe".
---
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.
next prev parent reply other threads:[~2001-12-06 16:19 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-05 0:08 List container strawman 1.3 Ted Dennison
2001-12-05 0:26 ` Ted Dennison
2001-12-05 1:31 ` Vincent Marciante
2001-12-05 8:35 ` Jean-Marc Bourguet
2001-12-05 15:02 ` Ted Dennison
2001-12-05 13:22 ` John English
2001-12-05 16:42 ` Ted Dennison
2001-12-05 21:22 ` Mark Lundquist
2001-12-05 21:38 ` Mark Lundquist
2001-12-05 22:42 ` Ted Dennison
2001-12-05 23:59 ` Mark Lundquist
2001-12-06 14:50 ` Iterator approach (was: List container strawman 1.3) Ted Dennison
2001-12-06 16:19 ` Ted Dennison [this message]
2001-12-06 17:41 ` Mark Lundquist
2001-12-06 17:57 ` Preben Randhol
2001-12-07 16:19 ` Ted Dennison
2001-12-06 17:47 ` List container strawman 1.3 Darren New
2001-12-07 16:00 ` Ted Dennison
2001-12-07 17:18 ` Darren New
2001-12-09 14:04 ` Mark Lundquist
2001-12-05 16:44 ` Simon Wright
2001-12-05 2:57 ` Jeffrey Carter
2001-12-05 3:45 ` Ted Dennison
2001-12-05 6:01 ` Jeffrey Carter
2001-12-05 13:17 ` John English
2001-12-05 15:46 ` Ted Dennison
2001-12-05 18:03 ` Georg Bauhaus
2001-12-05 18:30 ` Ted Dennison
2001-12-06 13:56 ` Georg Bauhaus
2001-12-06 14:59 ` Ted Dennison
2001-12-06 0:18 ` Jeffrey Carter
2001-12-06 13:52 ` Georg Bauhaus
2001-12-06 16:56 ` Jeffrey Carter
2001-12-06 19:33 ` Georg Bauhaus
2001-12-07 16:22 ` Ted Dennison
2001-12-05 16:53 ` Ted Dennison
2001-12-05 17:09 ` Larry Kilgallen
2001-12-06 23:07 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox