3 ms·
If your program has state, it doesn't matter if it's mutable or immutable state, you will still run into the same problems when working with concurrency. You ei
by z3t4 11y ago
If your program has state, it doesn't matter if it's mutable or immutable state, you will still run into the same problems when working with concurrency. You either have to use locks, make sure functions are executed in the right order, or the preferred way: designate/central state.
So functions vs object orientated is mostly a matter of preference.
One advantage with functional programming though, is that it will be much easier so serialize the state.
- JBiserkov 11y agoI respectfully disagree. I also encourage you to take a look at http://clojure.org/state http://clojure.org/state
- codygman 11y ago> If your program has state, it doesn't matter if it's mutable or immutable state, you will still run into the same problems when working with concurrency. You either have to use locks, make sure functions are executed in the right order, or the preferred way: designate/central state. What about using STM: https://www.fpcomplete.com/school/advanced-haskell/beautiful-concurrency/1-introduction https://www.fpcomplete.com/school/advanced-haskell/beautiful...