C
C#3y ago
zxa4fd

When should we use immutable data structures?

When should we use immutable data structures?
2 Replies
zxa4fd
zxa4fdOP3y ago
Are there specific situations where we would need to avoid defensive copying?
Thinker
Thinker3y 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.

Did you find this page helpful?