2 ms·
For what it's worth, I agree that a graph of stateful objects referencing each other is much easier to express in an OO language than in a pure functional langu
by cousin_it 12y ago
For what it's worth, I agree that a graph of stateful objects referencing each other is much easier to express in an OO language than in a pure functional language. There are many functional solutions, but none of them are very nice IMO. Maybe that's one reason to use an impure functional language like ML, which I consider an overall better language than Haskell.
- djur 12y agoI think we agree on this one. I've really been enjoying using OCaml exactly because I can make use of mutable state or OO-style polymorphism when I want, but otherwise it feels very natural to write pure functional code. All I need to do is wrap my head around functors and first-class modules and I'll actually feel like I understand it well enough to use it for real work.