Right, the simple left-to-right chaining is why I thought that |> might be
a good fit for Rust - foo |> bar means exactly do foo and then bar.
On Sep 26, 2013 7:21 PM, "Jeff Petkau" <j...@google.com> wrote:

> I don't think the problem with '$' is that it's infix; it's that it makes
> the data flow read right-to-left. The '|>' operator from F# is just "swap
> ($)", but it tends to make code much more readable.
>
> In fact, I think the whole appeal for object oriented style dot.method
> notation is that it makes things tend to read more consistently
> left-to-right. "I have a foo, and I do baz and blah and bar to it" vs. "I
> do bar to the result of doing blah to the result of doing baz to a foo."
>
> Jeff
>
>
> On Thu, Sep 26, 2013 at 8:37 AM, Tim Chevalier <catamorph...@gmail.com>wrote:
>
>> FWIW, Haskellers often complain about the readability of code that
>> uses the `$` operator a lot. I've heard such complaints both from
>> people new to Haskell and more experienced Haskell programmers. In
>> general in Rust, we avoid infix operators (we have a fixed of them and
>> -- unlike Haskell -- no way for users to define new ones), and given
>> the history of `$` in Haskell, I don't see a particular reason to make
>> an exception.
>>
>> Cheers,
>> Tim
>>
>>
>>
>> --
>> Tim Chevalier * http://catamorphism.org/ * Often in error, never in doubt
>> "Being queer is not about a right to privacy; it is about the freedom
>> to be public, to just be who we are." -- anonymous, June 1990
>> _______________________________________________
>> Rust-dev mailing list
>> Rust-dev@mozilla.org
>> https://mail.mozilla.org/listinfo/rust-dev
>>
>
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to