Software Engineering discussion

5 views
Learn You a Haskell > Input and Output

Comments Showing 1-1 of 1 (1 new)    post a comment »
dateUp arrow    newest »

message 1: by [deleted user] (new)

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.


back to top