Revised RFC on range design for D2

Walter Bright newshound1 at digitalmars.com
Fri Sep 12 12:39:56 PDT 2008


Andrei Alexandrescu wrote:
> Thanks. One problem in coding with first and last was that sometimes the 
> code looks unnatural, especially when your range exposes a few more 
> functions. In a stream parser, dealing with the "first" element is not 
> the most natural way to think of it. But I agree that first and last are 
> definitely palatable and natural most of the time. But then again, 
> shouldn't any design have the inevitable cutesy that makes it memorable? 
> :o)

One consideration when selecting names is how it would interact with 
google. One advantage to head/toe is there is already head/tail when 
thinking of a list, and head/toe would fit into that naturally.


More information about the Digitalmars-d-announce mailing list