getNext

Timon Gehr timon.gehr at gmx.ch
Mon Jul 9 09:25:06 PDT 2012


On 07/09/2012 06:17 PM, Mehrdad wrote:
> On Monday, 9 July 2012 at 16:06:57 UTC, Timon Gehr wrote:
>>
>> Consider the possibility that this electrical engineer might be a
>> plumber as well.
>
> Yes, so if you expect him to be, then you should ask him "are you a
> plumber?" (i.e. output range?)
>
>
> But what you're asking him right now is, "hey, can you do clear this
> pipe for me with copper wires??" which is downright silly.

The range is an input range of references. It could just as
well be an input range of setters. I do not see why the notion of
'input range' should restrict the kinds of elements that are accessed
by iterating the range. It would be downright silly.

> Being able to
> write to an output range does NOT require you to have 'ref' members. The
> only thing 'ref' ever buys you is performance, not any new capabilities.
> Depending on it doesn't make sense.

sort!"a[0]<b[0]"(zip(ra1,ra2));


More information about the Digitalmars-d mailing list