3 ms·
I think it's a "to each his own" thing. Personally I've always found Haskell's syntax to be distracting. The operators are kind of visually "thick" and the pr
by breckinloggins 14y ago
I think it's a "to each his own" thing. Personally I've always found Haskell's syntax to be distracting. The operators are kind of visually "thick" and the prefix/postfix/infix mix obscures the logic for me.
Of course, this is because I only barely grok Haskell. If I really knew Haskell I'm sure I wouldn't have an issue with the syntax, but as someone trying to learn about Monads from a category-theoretic perspective, Haskell just ends up confusing me more than the extra annotations provided by its type system can compensate.
I found I understood monads a little better after this article, because the Lisp syntax is uniform enough that it disappeared into the background. The lack of type annotation brings some fresh confusion right back in, but that's the cost of using Clojure for this example.
Again, all of this is just how my own brain works. Your brain may vary :)
An interesting approach would be to try teaching monads with typed Racket. [1]
[1] http://docs.racket-lang.org/ts-guide/ http://docs.racket-lang.org/ts-guide/
- tikhonj 14y agoIf you're coming from a mathematical perspective (I should note that I didn't but kind of wish I did), then the Haskell type system has an additional advantage: it's very obvious how Haskell types form a category and I've found it's very easy to visualize how functors, monads and so on "look" (for lack of a better term) on the category of Haskell types. Of course, I'm really trying to do the opposite--get a basic understanding of the math from using functors, monads and so on in Haskell. I also read about type theory for fun, so maybe I'm not the least biased person to ask about static typing :P.