3 ms·
Using a language that eschews state to try and process the state in a modal editor tickles me.
by ajanuary 13y ago
Using a language that eschews state to try and process the state in a modal editor tickles me.
- mercurial 13y agoIt doesn't. You can't run a program made of only pure functions. What it does it manage it.
- nbouscal 13y agoTo elaborate on the other reply, Haskell actually takes a very in-depth and principled approach to managing state. State is necessary for many applications, so rather than eschew it entirely, the idea is to isolate it and make it as explicit as possible. Frequently in complex stateful applications this is done by use of the State monad, with lenses to handle mutation of that state. There's a lot of theory behind it, but in practice it ends up being pretty similar in difficulty level to managing state in more popular languages, just a hell of a lot safer.
- codygman 13y agoI know others have said it, but I would like to echo the "please don't say that Haskell eschews state" message :)
- efnx 13y agoParsing and lexing in Haskell is one of its shining glories.