ch-ch-changes
Joel C. Salomon
joelcsalomon at gmail.com
Wed Jan 28 15:00:42 PST 2009
Jarrett Billingsley wrote:
> I was thinking about making D ranges be to D arrays as C++ iterators
> are to C++ pointers: r[0] is head and r[$ - 1] is toe. But that has
> problems, since you can't make an infinite range, since you can't say
> that r[0] is legal while r[$ - 1] is not. (D also doesn't allow
> overloading $, an irritating limitation, but one that could be fixed
> in order to implement such a paradigm.)
IIRC, Python uses negative indices to iterate from the end. Or is this
entirely not what is under discussion?
—Joel Salomon
More information about the Digitalmars-d
mailing list