|
|
|
|
|
by mrkeen
1156 days ago
|
|
Brilliant write up. > There is also a school of thought that you should start Haskell by teaching the IO monad first, but I am not convinced: in my experience, if someone gets exposed to IO early on, they will contaminate all their functions with IO. They will essentially end up writing Java in Haskell. I don't think this is such a bad starting place. Crawling before walking. Purifying an (unnecessarily-) IO function into an ordinary function is a good exercise. Trying to enforce non-IO from the start would be like enforcing 'no new keyword & factories only' in another language. |
|
That was enough to do most basic tasks and only later was it explained why they can't be mixed directly.
[1] https://en.wikibooks.org/wiki/Haskell