4 ms·
As a seasoned C++ programmer, that occasionally plays with Haskell, here is a question? Has finally Haskell the problem of how to do destructive updates or not
by axilmar 6y ago
As a seasoned C++ programmer, that occasionally plays with Haskell, here is a question?
Has finally Haskell the problem of how to do destructive updates or not?
If it cannot do destructive updates, I am not interested. The kind of software I am called to build always requires destructive updates for performance reasons and secondly I am so used to assignment and all the design patterns around it that I don't think I should bother with something that does not provide that.
- dundarious 6y agoIf that means you're not a fan of ST or the State monad, maybe the newly added linear types support will eventually provide what you're looking for.
- agentultra 6y agoIt can and direct you to do it safely and is about to get better. Looking forward to GHC 8.12 and linear types.
- runeks 6y agoHaskell can do destructive (in-place) updates via various forms of mutable variables (e.g. IORef).
- dllthomas 6y agoAnd mutable arrays: https://hackage.haskell.org/package/array-0.5.4.0/docs/Data-Array-MArray.html https://hackage.haskell.org/package/array-0.5.4.0/docs/Data-...
- tome 6y ago> Has finally Haskell the problem of how to do destructive updates or not? No "finally" about it. Haskell must have had destructive updates for at least a couple of decades.