Revised RFC on range design for D2
Pablo Ripolles
in-call at gmx.net
Fri Sep 12 06:19:14 PDT 2008
Andrei Alexandrescu Wrote:
> 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
Well, in the first place thanks to you! I really enjoy this enthusiastic attitude.
About "first", well, I didn't mentioned "first" as an alternative to "head" but "header" which is not necessarily an animal-like characteristic. Anyway, "head" is definitely more poly-meaning than "toe"!!!! I definitely would look for neutral alternative...
What about "isDone"?
And yes, to have a personality in the naming is nice but I guess that in this case seems too concrete, anthropocentric, I don't know, what the heck! even "tail" is semantically wider!
Keep this great interaction! Thanks!
More information about the Digitalmars-d-announce
mailing list