Revised RFC on range design for D2

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Sep 12 10:49:54 PDT 2008


Sergey Gromov wrote:
> Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:
>> Sergey Gromov wrote:
>>> *)
>>> next() is specified to return a value, but reduce() is not.  This is 
>>> probably a typo.  I'd prefer them both be implemented as (done(), head) 
>>> and (reduce(), toe) respectively, but I don't know what your intention 
>>> was.
>> Neither of next and retreat should return a value. In wake of 
>> constructors/destructors, we shouldn't return by-value lightly.
> 
> Then, in Input range primitives, e=r.next must be just r.next.

Oh, now I see. Fixed.

But I still want us to contemplate the possibility of unifying input 
ranges with recycling, and other ranges, under the same interface.


Andrei


More information about the Digitalmars-d-announce mailing list