News for hackers. Stuff that matters.
Re:How to read Haskell like Python by rayiner on Tuesday November 15, 2011 @12:39AM (#3237179)
All the notation is marginally useful when you're writing math on a chalkboard, but saving a few characters in source code isn't really worth it. I like languages that resist the urge to make use of those letters above the number keys.

The fact that Haskell allows libraries to define their own operators is a crime against humanity that justifies the sort of criticism usually leveled at Lisp macros, which is that it's impossible to guess what they mean without looking them up.

Re:How to read Haskell like Python by Peaker on Tuesday November 15, 2011 @06:43AM (#3237888)
Operators are just names.

When you're writing very abstract code that operates on abstract structures -- there's often no name that conveys the meaning. English and maths don't have names for every useful abstraction and abstract concept.

Instead of inventing some arbitrary name in English, you invent some arbitrary name as an operator, and that gives you infix syntax (often desirable for binary operators) and a recognizable visual signature.

Also, operators can greatly enhance readability, if you know a certain convention. Consider for example a vector library:

There are various arithmetic operators -- and those can be applied on scalars and vectors. Ordinary arithmetic operators operate on scalars. If < is prepended on the left side of the operator, then the left argument is a vector, and similarly with > on the right side. This makes it easy to immediately know what <+> means, vs what *> means, and so forth.

Re:How to read Haskell like Python by chriseidhof on Tuesday November 15, 2011 @02:37AM (#3237421)
In other languages I agree, in Haskell it's perfectly normal and no problem. Most of the times, the Haskell code is very readable.