|
|
|
|
|
by brandonspark
938 days ago
|
|
This is Haskell-specific, it sounds like. I agree, the IO monad is really quite inconvenient sometimes. I work in OCaml, which is also a functional language, but prints can be added in single lines. I address this point in Lecture 19 (Imperative Programming), actually, but my perspective is -- we invented immutability and purity to serve us, but we need not be fanatically beholden to it. In my opinion, I think Haskell goes in that direction, when every usage of IO now needs the IO monad to get involved. A little mutability is OK. Functional programming is about the avoidance of side effects, more than simply forbidding it. |
|