
I agree with Dan here. `(=<<)` is the nicer operator from a theoretical perspective, because (A) its signature can be generalized to other categories and (B) it obeys the following functor laws: (=<<) (f <=< g) = (=<<) f . (=<<) g (=<<) return = id If we had to pick one operator to name, `(=<<)` should be the one we pick. On 12/11/14, 7:34 AM, Dan Burton wrote:
I like this argument order better, because it shows how (a -> m b) gets lifted into (m a -> m b). If we only get one word, and we have to choose between naming (>>=) and (=<<), I'd choose the latter for this reason.
I don't care what the name is, but having an alphabetic name for most operators would be nice. Haskell's custom operators are a turn-off for several people I know. I don't think Haskell the language should push operators onto people that don't want to use them. Nor should the burden be on them to create an alias.
-----
If I could go back and redesign Haskell, I'd make it so that operators could only be defined as synonyms of alphabetically-named functions.
infixl 6 (+) = plus
-- Dan Burton
On Thu, Dec 11, 2014 at 5:37 AM, Felipe Lessa
mailto:felipe.lessa@gmail.com> wrote: On 11-12-2014 10:38, Henning Thielemann wrote: > Thus it is generally a good idea to indent with a fixed size, instead of > indenting according to function names.
I agree and that's what I do. However, Chris and Oliver indented their examples by 5 spaces, which is pretty odd (pun intended), so I imagine they prefer otherwise and I've listed that as a possible disadvantage.
Cheers, :)
-- Felipe.
_______________________________________________ Libraries mailing list Libraries@haskell.org mailto:Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries