[RFC] Add an operator for ranges to D. Pros and cons?
Peter Alexander
peter.alexander.au at gmail.com
Wed Nov 7 05:21:35 PST 2012
On Wednesday, 7 November 2012 at 13:07:13 UTC, Dejan Lekic wrote:
> Therefore I would like to know what do you think about the idea
> of having additional operator exclusively made for ranges? This
> operator would make it obvious that data are "streamed" (lack
> of better term) among ranges.
>
> The first name I could come up with was "opArrow" but "opData"
> could also be okay, and operator would be either "~>" or "->".
>
> This would give us an obvious, unambiguous statement:
>
> Console.in ~> filter1(param) ~> fooRange ~> Console.out;
> // Console is an imaginary class/struct
>
> Or:
> arr ~> odd ~> random ~> randomOdd;
I'm confused. So does this new operator just do the same thing as
dot, but only work with ranges? Or does it have additional useful
semantics?
More information about the Digitalmars-d
mailing list