Change representation of dynamic arrays?

Janice Caron caron800 at googlemail.com
Sat Oct 20 01:57:45 PDT 2007


On 10/20/07, Chris Miller <chris at dprogramming.com> wrote:
> Or perhaps you
> want a slice to be an iterator itself, so you could just do slice++ and it
> slices out the first element.

It would be very counterintuitive if ("world"++ == "orld"), so I don't
think I'd like that.

In C++ terms, an interator is often just a pointer (plus some operator
overloads), and an array of [ begin, end ]  iterators is called a
range. Looked at like that, an array slice in the new scheme would be
an array of two iterators (i.e. a range), rather than a single
iterator.

Or so it seems to me.



More information about the Digitalmars-d mailing list