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

Reply via email to