Consolidated this info from various Stack Overflow questions:
- you need to know:
- what data means
- where data was first assigned
- where data can be changed
- when data can be changed
- if those changes can happen concurrently and require locks, what sequence locks need to be acquired in
- if changing the data needs coordination with others
- if data is actually changed here
- complexity: mutable data is inherently complex, because it can change
- you need to know:
- what data means
- where it was first assigned
- (perhaps) how it is used here
- garbage collection efficiency
- lock-free operation
- efficient substructure sharing
- safely access data from 2 threads without worrying about locks or other concurrency issues
- produces code that's easier to reason about, easier to test, and easier to be confident about its correctness
could do