News for hackers. Stuff that matters.
Re:Haskell: The Confusing Parts by tel on Monday October 05, 2009 @01:07PM (#862151)
I appreciate both, honestly. Lisp achieves a great deal through purity of syntax, but that sort of thing was never Haskell's goal. Personally, I almost never think about how precedences compare; instead you learn a Haskell coding style that support the syntactic tricks allowed by operator precedence. A pretty common one goes something like this:

  forM [1..] $ \n -> do
    a <- monadicAction1 n
    b <- monadicAction2 a
    return b
Which is sort of ugly from a Lisp point of view, but I think it's a great trick enabled by having $ be an ultra-low precedence sequencing combinator. It looks like a Ruby block almost, but has zero extra syntax and very clear semantics.

There are no comments on this comment yet.