Software Engineering discussion
Learn You a Haskell
>
Input and Output
date
newest »

message 1:
by
[deleted user]
(new)
Mar 14, 2012 07:06AM
Totally pure functional languages can't allow I/O, because that introduces side effects and changes state. Input changes state inside a Haskell program and output changes state outside of the program's world. This also means that totally pure functional languages are totally useless for real-world applications. So, it is interesting to read how Haskell decided to carefully break the rules with I/O. In particular, it introduces a do statement that sequentially executes lines within it, so the code looks more imperative than functional.
reply
|
flag