
On 10/12/14 19:08, Greg Weber wrote:
On Wed, Dec 10, 2014 at 8:43 AM, Andreas Abel
mailto:andreas.abel@ifi.lmu.de> wrote: On 10.12.2014 17:33, John Lato wrote:
I don't really understand why people want this. What's wrong with (=<<) ? I kind of feel like a named function should be no longer than that.
You are right, we do not need a alphabetic version of every operator. We do not have
plus = (+)
either. Why take another good name from the user, just to avoid using an operator in parentheses?
As a default rule, I think every operator should have a named function. This is because symbols have no inherit meaning, but words do. Math is the exception to the rule. Basic math is universal: someone coming from any background will immediately recognize (+), (-), etc. Monad operators only seem universal once you have been programming Haskell for several years :)
I agree that math is a poor analogy here. On the other hand, you're suggesting that a newcomer has to memorize two names instead of one to read Haskell code fluently. Words do carry a meaning, but the meaning is usually vague and doesn't tell you what that function does or what its type is. Roman