News for hackers. Stuff that matters.
Re:Why does Haskell, in your opinion, suck? by virmundi on Sunday April 17, 2016 @07:14PM (#11516787)
Thank you for the explanation. Haskell's not as bad as I thought in this respect. My understanding was IO streams were a single input function (ie the stream). As a result the destructiveness would be less obvious.

Can you replay a get from stream by passing in an older token?

Re:Why does Haskell, in your opinion, suck? by solidsnack9000 on Monday April 18, 2016 @12:50AM (#11517788)
Because the token is passed only within the implementation of `>>=`, which is private to the IO module, you never have access to it. So no need for the runtime to keep snapshots lying around.

Monads provide a way to combine them and a way to inject values into them; but not all monads provide the inspection interface that would allow you to examine that state token. The definition of a monad guarantees only the injection and the combination (the "unit" and "multiply").