Why is array.reverse a property and not a method?
Steven Schveighoffer
schveiguy at yahoo.com
Tue Jul 13 04:23:53 PDT 2010
On Mon, 12 Jul 2010 15:42:49 -0400, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
>
> put(R, E) -> putNext(R, E)
>
> Rationale: conveys the notion that there is progress in the output.
Can we have E getNext(R) also for completeness :) Then an input range can
be defined similarly to an output range (where delegates and ranges that
support E get() work).
Since put/putNext already establishes the notion of throwing when full,
having getNext throwing when empty would be OK, no?
-Steve
More information about the Digitalmars-d
mailing list