C
C#2y ago
zxa4fd

When should we use immutable data structures?

When should we use immutable data structures?
2 Replies
zxa4fd
zxa4fd2y ago
Are there specific situations where we would need to avoid defensive copying?
Thinker
Thinker2y ago
I'll chime in here a bit late to mention that immutability can help you reason about your code a lot easier. Keeping track of mutable state can be very difficult and annoying, and immutable data structures can assist in remedying that.