RFC on range design for D2

Benji Smith dlanguage at benjismith.net
Tue Sep 9 15:06:14 PDT 2008


Andrei Alexandrescu wrote:
> Hmm, HMMs :o). If you could do it with Java's hasNext and next, you can 
> do it with D's isEmpty and next. There's no difference.
> 
> 
> Andrei

Oh. Okay. Good to know :)

I guess all the talk about "ranges" has me visualizing contiguous items 
and sequential ordering and determinism. It's a good word for a 
well-defined set of items with a true beginning and end, but I wonder 
whether "cursor" might be a better word than "range", especially for 
input consumption and non-deterministic iteration.

One thing I definitely like better about the new range proposal is the 
notion that the container is not responsible for providing iteration 
logic or, more importantly, maintaining the state of any iteration. I 
think it'll be a welcome change.

Nice work, and I'm looking forward to working with the new stuff :)

--benji


More information about the Digitalmars-d-announce mailing list