Revised RFC on range design for D2
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Thu Sep 25 14:06:58 PDT 2008
Bruno Medeiros 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
>
> """
> 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.
I sure hope they won't agree to an unsupported assertion.
> So "src.next" would be must better as "src.next()" as "src.next" really
> just makes me cringe.
With me it's the opposite, particularly after I've written and stared at
a few hundreds of "()"s due to a compiler bug.
Andrei
More information about the Digitalmars-d-announce
mailing list