[Submission] D Slices

Timon Gehr timon.gehr at gmx.ch
Tue May 31 13:27:44 PDT 2011


eles wrote:
> == Quote from Ali Çehreli (acehreli at yahoo.com)'s article
> > On 05/31/2011 08:10 AM, eles wrote:
> >  > I know no other examples where open-right limits are used.
> > The C++ standard library uses open-right with its pairs of
> iterators.
> > The second iterator "points" at one beyond the last element of the
> range.
> > Ali
>
> C'mon, if C++ is such a good standard, then D would have never
> appeared. Why not dropping D completely and go to C++ then?
>
> The fact that C++ uses it that way does not making it good for us.
>
> D choose slices, not iterators. Maybe we should remind why it did it
> in the first place.

D slices do not require being able to point to invalid data past the end of the array.

>
> Now, we are taking the "enemy" (well, is a joke) as a reference in
> the matter?


Timon


More information about the Digitalmars-d mailing list