3 ms·
> Haskell avoids state. That's a myth. You need state for computation. It's not a language issue. You need just as much state in Haskell as you need in other l
by jstimpfle 7y ago
> Haskell avoids state.
That's a myth. You need state for computation. It's not a language issue. You need just as much state in Haskell as you need in other languages. In Haskell you just specify each little component as a function which takes as a parameter what is effectively global state.
Which, by the way, is usually a bad idea because it causes so much boilerplate. Plus, it makes it unclear how many instances of a given concept can actually exist in a running program.