RFC on range design for D2
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Sep 10 10:35:26 PDT 2008
David Gileadi wrote:
> Sergey Gromov wrote:
>> If you draw a parallel between a range and a stack of paper, the
>> shrink methods would probably be pop/snap... I'd also propose next()
>> for moving the start and prev() for moving the end. It sounds a bit
>> misleading but, on the other hand, it closely resembles forward and
>> backward iteration with the opposite end of a range representing the
>> iteration limit. Or maybe forward()/backward(), or fwd()/back()?
>
> Perhaps reduce() instead of pop() for moving the end?
I love reduce! Thought of it as well. Unfortunately the term is loaded
with reduction of a binary operation over a range, as e.g. in std.algorithm.
I think shrink() is reasonable. next() moves to the next thing. shrink()
shrinks the set of dudes I can reach.
Andrei
More information about the Digitalmars-d-announce
mailing list