4 ms·
Having used STM in Haskell, actors look like a draconian way to handle shared mutable state.
by DanWaterworth 12y ago
Having used STM in Haskell, actors look like a draconian way to handle shared mutable state.
- lomnakkus 12y agoExactly! Unless you're hitting actual trouble with contention (or some such), there's absolutely no reason to be programming as defensively as we must do in distributed systems.
- DanWaterworth 12y agoIf you have problems with contention, you can use a library like this [1], that allows you to perform transactions (with the restriction that you must know the variables you may touch ahead of time) without deadlocking or livelocking. [1] https://hackage.haskell.org/package/blocking-transactions https://hackage.haskell.org/package/blocking-transactions