3 ms·
Haskell doesn't prevent side effects. Otherwise, you wouldn't be able to do I/O. Instead, Haskell requires you to be explicit about side effects through Monad
by j_baker 15y ago
Haskell doesn't prevent side effects. Otherwise, you wouldn't be able to do I/O. Instead, Haskell requires you to be explicit about side effects through Monads.
I think about it this way: imperative languages allow side effects by default, but allow you to write side-effect free code. Purely functional languages don't use side-effects by default, but allow you to write code with side-effects.