From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Wanted: Ada STL. Reward: Ada's Future
Date: 1999/02/05
Date: 1999-02-05T00:00:00+00:00 [thread overview]
Message-ID: <Pine.BSF.4.05.9902050933190.3807-100000@shell5.ba.best.com> (raw)
In-Reply-To: u3e4k50zq.fsf@gsfc.nasa.gov
On 5 Feb 1999, Stephen Leake wrote:
> Brian Rogoff <bpr@shell5.ba.best.com> writes:
> Still, there is a distinction between "Last" and "Finish". In Ada,
> indexing an array with Last gives a valid data element. In C++ STL,
> dereferencing a "Finish" iterator does _not_ give a vaid data pointer.
> That is the essential difference in style.
True, it is not the same as 'First and 'Last. A zero length sequence has
no valid dereferenceable first or last element, so a general subsequence
abstraction should have indices which refer to positions between the
elements, not the elements themselves. That makes for the most elegant
definition.
> Let me ask my question this way. Define an iterator value "Last" that
> represents the last valid data element in a container. Define an
> iterator value "Finish" that represents no valid data element in a
> container. Also define Prev (Finish) == Last.
How do we define Last if the container is empty? It seems we either just
use Finish, or we screw your definition up a bit.
> 1) Are there algorithms that can be expressed in terms of Finish that
> cannot be expressed in terms of Last?
>
> 2) Do we also need Begin and First? or just First?
I can't thinnk of a good reason why you need two "off the end" iterators.
Just imagine the sequence is a ring buffer.
-- Brian
next prev parent reply other threads:[~1999-02-05 0:00 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-31 0:00 Wanted: Ada STL. Reward: Ada's Future Alexy V Khrabrov
1999-01-31 0:00 ` Simon Wright
1999-02-01 0:00 ` Jeff Carter
1999-02-08 0:00 ` Michael F Brenner
1999-02-01 0:00 ` Matthew Heaney
1999-02-01 0:00 ` Alexy V Khrabrov
1999-02-01 0:00 ` Matthew Heaney
1999-02-01 0:00 ` Jeff Carter
1999-02-01 0:00 ` Brian Rogoff
1999-02-01 0:00 ` Ehud Lamm
1999-02-02 0:00 ` Richard D Riehle
1999-02-03 0:00 ` robert_dewar
1999-02-02 0:00 ` Brian Rogoff
1999-02-02 0:00 ` robert_dewar
1999-02-04 0:00 ` Ehud Lamm
1999-02-03 0:00 ` John English
1999-02-03 0:00 ` Matthew Heaney
1999-02-03 0:00 ` Brian Rogoff
1999-02-04 0:00 ` Stephen Leake
1999-02-04 0:00 ` Brian Rogoff
1999-02-05 0:00 ` Stephen Leake
1999-02-05 0:00 ` Brian Rogoff [this message]
1999-02-04 0:00 ` Matthew Heaney
1999-02-04 0:00 ` Hyman Rosen
1999-02-05 0:00 ` Stephen Leake
1999-02-05 0:00 ` Hyman Rosen
1999-02-05 0:00 ` John English
1999-02-05 0:00 ` Tucker Taft
1999-02-05 0:00 ` Richard D Riehle
1999-02-05 0:00 ` Brian Rogoff
1999-02-05 0:00 ` Brian Rogoff
1999-02-06 0:00 ` Matthew Heaney
1999-02-05 0:00 ` John English
1999-02-05 0:00 ` Nick Roberts
1999-02-04 0:00 ` Ehud Lamm
1999-02-04 0:00 ` Brian Rogoff
1999-02-05 0:00 ` Matthew Heaney
1999-02-05 0:00 ` Brian Rogoff
1999-02-08 0:00 ` John English
1999-02-04 0:00 ` Pat Rogers
1999-02-04 0:00 ` Larry Kilgallen
1999-02-04 0:00 ` Pat Rogers
1999-02-04 0:00 ` Larry Kilgallen
1999-02-05 0:00 ` robert_dewar
1999-02-05 0:00 ` Larry Kilgallen
1999-02-05 0:00 ` Tom Moran
1999-02-05 0:00 ` dewar
1999-02-05 0:00 ` Tom Moran
1999-02-05 0:00 ` dewar
1999-02-05 0:00 ` dennison
1999-02-06 0:00 ` dewar
1999-02-08 0:00 ` dennison
1999-02-08 0:00 ` robert_dewar
1999-02-08 0:00 ` dennison
1999-02-09 0:00 ` robert_dewar
1999-02-09 0:00 ` dennison
1999-02-09 0:00 ` Nick Roberts
1999-02-07 0:00 ` Simon Wright
1999-02-08 0:00 ` Corey Minyard
1999-02-08 0:00 ` Open Source Licensing (was: Wanted: Ada STL. Reward: Ada's Future) dennison
1999-02-08 0:00 ` Corey Minyard
1999-02-09 0:00 ` dennison
1999-02-09 0:00 ` Corey Minyard
1999-02-09 0:00 ` robert_dewar
1999-02-09 0:00 ` Corey Minyard
1999-02-09 0:00 ` Wanted: Ada STL. Reward: Ada's Future robert_dewar
1999-02-09 0:00 ` dennison
1999-02-10 0:00 ` robert_dewar
1999-02-07 0:00 ` Simon Wright
[not found] ` <36ba730b.35540068@ <79fmg1$fn0$1@nnrp1.dejanews.com>
1999-02-06 0:00 ` Larry Kilgallen
1999-02-05 0:00 ` robert_dewar
1999-02-05 0:00 ` robert_dewar
1999-02-05 0:00 ` Larry Kilgallen
1999-02-05 0:00 ` robert_dewar
1999-02-05 0:00 ` dennison
1999-02-05 0:00 ` robert_dewar
1999-02-05 0:00 ` dennison
1999-02-06 0:00 ` Nick Roberts
1999-02-05 0:00 ` Tucker Taft
[not found] ` <79f24e$t14 <36BB4162.52FC6D9F@averstar.com>
1999-02-05 0:00 ` robert_dewar
1999-02-05 0:00 ` dennison
1999-02-04 0:00 ` Al Christians
1999-02-05 0:00 ` John English
1999-02-09 0:00 ` micro_ada
1999-02-05 0:00 ` Nick Roberts
1999-02-08 0:00 ` John English
1999-02-02 0:00 ` Pointer Arithmetic (was: Wanted: Ada STL....) adam
1999-02-02 0:00 ` William Clodius
1999-02-03 0:00 ` adam
1999-02-03 0:00 ` robert_dewar
1999-02-03 0:00 ` Jean-Pierre Rosen
1999-02-03 0:00 ` Nick Roberts
1999-02-03 0:00 ` William Clodius
1999-02-03 0:00 ` robert_dewar
1999-02-03 0:00 ` Nick Roberts
1999-02-03 0:00 ` robert_dewar
1999-02-03 0:00 ` Robert A Duff
1999-02-01 0:00 ` Wanted: Ada STL. Reward: Ada's Future Stanley R. Allen
1999-02-01 0:00 ` Jerry van Dijk
1999-02-01 0:00 ` Marin David Condic
1999-02-01 0:00 ` dennison
1999-02-05 0:00 ` Corey Minyard
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox