4 ms·
Yes, you're correct, that did sound more like linear types. I was trying for a simple description of why mutability can be regarded as an optimization/implement
by camccann 17y ago
Yes, you're correct, that did sound more like linear types. I was trying for a simple description of why mutability can be regarded as an optimization/implementation detail given certain guarantees.
That said, Haskell does allow more than just "the state of the world"--for instance, the State monad can contain whatever you like and (if memory serves me) is a strict superset of the IO monad.