4 ms·
What you're describing are just plain bad coding practices by people who didn't understand concurrency. Proper locking and synchronization are the real fixes.
by unclebucknasty 11y ago
What you're describing are just plain bad coding practices by people who didn't understand concurrency. Proper locking and synchronization are the real fixes.
Again, that's not to say that immutability never has a place.
- GFK_of_xmaspast 11y agoAs a C++ programmer, I make sure that things that can reasonably be const are const, because that reduces the number of places where things can go wrong. That said, sometimes state simply has to change, and anything else is just ideology.
- danieldk 11y agoConcurrency is hard. Immutability skates around the whole problem. A parser should be immutable, parsing state should be limited to a particular invocation of the parser. Of course, mutable state cannot be abolished everywhere (often for efficiency reasons). In such cases, you should indeed understand the concurrency primitives.