Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I TA’ed a Haskell course for four years, and I came to the conclusion that what made it so difficult to learn was the apparent implicit mixup between newtype syntax / overloading and purpose of even using them. (The newtype syntax is necessary to differentiate between multiple instances of the typeclass; if you threw away the newtype syntax and overloading, >>= could only mean something for one thing, making it comprehensible but less useful — taking both steps at once loses most people.)

Motivating the use of monads in FP requires solving a bunch of problems without, and realise your life would be so much easier if you abstracted out the commonality at the function composition level. But there isn’t time for that.

When you skip the motivation, the explanation becomes “Welcome to FP. We’re gonna jump through these hoops because math is beautiful, also, most of the syntax you’re typing gets thrown away at compilation, good luck and fmap fmap fmap!”



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: