3 ms·
Does Haskell treat mutability as an afterthought? I thought constructs like IORef were for cases in which mutability is needed.
by douglasisshiny 4y ago
Does Haskell treat mutability as an afterthought? I thought constructs like IORef were for cases in which mutability is needed.
- WastingMyTime89 4y agoNo, mutability was always central to Haskell. Investigating how you could track through the type system and isolate the parts of programs requiring side-effects was the research goal of Haskell. It’s the most notable evolution from Miranda. Haskell issue is not that mutability is an afterthought. Haskell issue is that Haskell is a good research project but not a very good programming language.
- douglasisshiny 4y agoThat could be the case. I've never used it. I did "learn" it to use a library (fp-ts) in typescript which basically brings Haskell into typescript and I love the concepts. It's certainly changed the way I think about programming.
- macrolocal 4y agoIt’s common for teams to overuse IORefs or the ST monad when they need mutability, which can make Haskell feel like an imperative language or maybe OCaml.