RFC on range design for D2

Michel Fortin michel.fortin at michelf.com
Mon Sep 8 21:24:18 PDT 2008


On 2008-09-08 23:57:49 -0400, "Manfred_Nowak" <svv1999 at hotmail.com> said:

> Andrei Alexandrescu wrote:
> 
>> maybe "nextTo" or something could be more suggestive.
> 
> r.tillBeg(s), r.tillEnd(s),
> r.fromBeg(s), r.fromEnd(s) ?
> 
> -manfred

I'm not sure I like this because you have to be careful when reversing 
the iterating direction. With my previous proposal, you only had to 
change "next" for "pull" everywhere. With yours, it's "till" to "from" 
*and* "Beg" to "End", as the relationship is somewhat interleaved:

r.nextUntil(s) => r.tillBeg(s)
r.nextAfter(s) => r.tillEnd(s)

r.pullUntil(s) => r.fromEnd(s)
r.pullAfter(s) => r.fromBeg(s)

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d-announce mailing list