RFC on range design for D2

Steven Schveighoffer schveiguy at yahoo.com
Tue Sep 9 15:28:34 PDT 2008


"Derek Parnell" wrote
> On Tue, 09 Sep 2008 10:45:53 -0500, Andrei Alexandrescu wrote:
>
>
>>          ref int left() { ... }
>
> Is "left" a "movement in a specific direction" as in "go left at the next
> lights" or the "amount of stuff left over"? It is a bit ambiguous. Even if
> it is a direction, is it moving towards the first or the last item? It is
> not self-evident. As a user of the Latin alphabet I'd assume it was going
> towards the first item but a Hebrew or Arabic users might assume it was
> heading towards the end.

It means 'left-most element in the range'.  It gets you the first element in 
the range (i.e. the next element to iterate) without modifying the range.

I agree that it is very misleading, but I think Andrei is exploring other 
possibilities (see other threads).

-Steve 




More information about the Digitalmars-d-announce mailing list