comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: ASCL a doomed idea?
Date: Wed, 12 Dec 2001 04:29:31 GMT
Date: 2001-12-12T04:29:31+00:00	[thread overview]
Message-ID: <3C16DD1F.E768B33@acm.org> (raw)
In-Reply-To: LhpR7.57428$xS6.92806@www.newsranger.com

Ted Dennison wrote:
> 
> Anyway, JC01 presents an unsafe style iterator. His comments say it could go
> either way, but if its safe, there's no sense in supplying the list with it like
> all JC01's routines do, so I think his presentation only makes sense for an
> unsafe iterator. For an unsafe iterator, I think "Position" is reasonable, as it
> at least underlines that you can't expect the compiler to do all your checking
> for you like you would with a true iterator.

It presents a specification that doesn't bias the implementation. If you
leave the list parameters off, you can't have an unsafe implementation,
but putting them in doesn't prevent a safe implementation.

> Which one we use is something that still needs to be decided. Perhaps there
> hasn't been much discussion about this because everyone is happy with the way
> the latest Strawman does it (safe)?

I'm not too concerned either way. Complete safety means insertion and
deletion are O(M) in time, where M is the number of Locations in
existence. The additional protection this gets you over mostly safe
Locations seems to be against pathological cases, misuse of a list of a
kind that I've never actually seen in practice (and I've seen some
pretty poor code using lists with completely unsafe Locations). So, I'm
not sure complete safety is worth the effort, but I won't be bothered if
it's deemed essential for the standard list.

-- 
Jeff Carter
"My brain hurts!"
Monty Python's Flying Circus



  parent reply	other threads:[~2001-12-12  4:29 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-06 20:26 ASCL a doomed idea? Michael Erdmann
2001-12-06 20:49 ` Mark Lundquist
2001-12-09 19:07   ` Nick Roberts
2001-12-09 21:37     ` Jeffrey Carter
2001-12-10 19:36       ` Nick Roberts
2001-12-10 22:37         ` Jeffrey Carter
2001-12-10 23:30           ` Chad R. Meiners
2001-12-11  1:42             ` Jeffrey Carter
2001-12-11  3:40               ` Chad R. Meiners
2001-12-11 14:45           ` Mark Lundquist
2001-12-11 15:06             ` Ted Dennison
2001-12-11 15:09               ` Jean-Marc Bourguet
2001-12-11 17:18               ` Stephen Leake
2001-12-12  4:29               ` Jeffrey Carter [this message]
2001-12-12 14:40                 ` Ted Dennison
2001-12-11 15:25             ` Larry Hazel
2001-12-12  4:21             ` Jeffrey Carter
2001-12-12 14:32               ` Stephen Leake
2001-12-12 19:40               ` Mark Lundquist
2001-12-16 13:23               ` Georg Bauhaus
2001-12-11 14:45         ` Mark Lundquist
2001-12-11 15:11           ` Ted Dennison
2001-12-11 17:43             ` Nick Roberts
2001-12-12  0:37               ` Mark Lundquist
2001-12-12  4:31           ` Jeffrey Carter
2001-12-11 22:45         ` Mark Lundquist
2001-12-12  1:39           ` Nick Roberts
2001-12-12 10:08             ` Ian Wild
2001-12-12 17:03               ` Nick Roberts
2001-12-12 22:09                 ` Brian Rogoff
2001-12-12 14:34             ` Marin David Condic
2001-12-11 14:45       ` Mark Lundquist
2001-12-12  4:32         ` Jeffrey Carter
2001-12-12 14:48           ` Ted Dennison
2001-12-12 17:02           ` 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