
On Thu, Oct 10, 2013 at 10:13 AM, Dan Doel
On Thu, Oct 10, 2013 at 4:46 AM, Simon Peyton-Jones
wrote: F# uses (|>). Maybe (#) is good. To me (&) looks too commutative because it’s usually used for conjunction.
I mentioned this on the core list, but I'll mention it here, too:
I don't like (|>), because once you have this operator, you also might as well have the functorial version. We have ($) and (<$>), and lens has (&) and (<&>). The latter is useful for functorial 'for blocks':
myFunctorValue <&> \x -> ...complex expression...
I actually think it's (significantly) more useful than (&). But, I think (<|>>) is a pretty awful name for it, so I'd prefer a name that makes both palatable.
I'm still not convinced we need flipped application in general[1], and I'm
sure we don't need new name suggestions at this point, but:
Consider <**> :: f a -> f (a -> b) -> f b.
That suggests <$$> :: f a -> (a -> b) -> f b by analogy, so maybe $$ :: a
-> (a -> b) -> b? This avoids the downsides of & while maybe being less
ugly to combine with things than |>. Also, it looks like $, suggesting
they're related.
[1]: Although it's certainly convenient for some idioms, like working with
lenses.
--
Dave Menendez