2 ms·
Pure functional languages can very well have normal IO. It's Haskell's lazyness that mostly forced it to use monads for IO, for better or for worse. In a pure F
by tsimionescu 4y ago
Pure functional languages can very well have normal IO. It's Haskell's lazyness that mostly forced it to use monads for IO, for better or for worse. In a pure FP language with strict evaluation semantics, IO can easily be implemented as a pure function foo -> (World, Input) -> (World, Output).
- tome 4y agoThat's not true at all. If you could use that implementation in a strict language (which you can't) you could equally-well use it in Haskell.