2 ms·
They are equivalent if you place your entire program into some StateT a IO monad, where a is the contents of the entire memory accessible within your program.
by marcosdumay 10y ago
They are equivalent if you place your entire program into some StateT a IO monad, where a is the contents of the entire memory accessible within your program.
That's to say, you do have a point, but both too big states and too little pure code are well recognizable smells. (I' not sure they are avoidable, but surely are smells.) On that sense, just by being easily recognizable they are already better.
I've been writing a small game in Haskell, and it has been funny to abuse monads and type classes for all sort of architectural features. But it's impossible to look at the code and mistake it for a well organized one.