Revised RFC on range design for D2
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Thu Sep 25 12:38:04 PDT 2008
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
"""
All ranges satisfy certain invariants outlined below. (r is an object of
a range type R.)
"""
By "object" you actually mean struct no? Struct instance to be even more
precise.
Also, some more on important bike shed issues:
for (; !src.done; src.next)
{
tgt.put(src.head);
}
As a matter of coding style conventions, I would say that using the
implicit property function call feature on a function that changes state
is *bad* style, and surely hope the community would agree on that.
So "src.next" would be must better as "src.next()" as "src.next" really
just makes me cringe.
--
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d-announce
mailing list