Revised RFC on range design for D2
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Sep 12 05:27:22 PDT 2008
Pablo Ripolles wrote:
> Andrei Alexandrescu Wrote:
>
>> In wake of the many excellent comments and suggestions made here, I made
>> one more pass through the draft proposal for ranges.
>>
>> http://ssli.ee.washington.edu/~aalexand/d/tmp/std_range.html
>>
>> There are some comments in red illustrating some uncertainties (not
>> all), and the names of the primitives have been updated. Bicycle shed
>> galore! But don't forget to comment on the reactor as well :o).
>>
>>
>> Andrei
>
>
> Well, it looks prety clean! :D
>
> However, I'm not completely sure I like these "head" and "toe" names selection. It projects to much on it, doesn't it? couldn't it be more neutral? perhaps more conceptual? I haven't been able to read the last days' comments... but my last impressions were that this "head" was not the best choice.
>
> If "head" is the header item, why not call it "header"?
>
> If ''toe" is the last item, why not call it "last"?
>
> Other comment goes for the "done" property, for the seek of consistence shouldn't it better be named "isDone"?
>
> Cheers!
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)
Andrei
More information about the Digitalmars-d-announce
mailing list