Code Smell 291 - Mutable Keys
TL;DR: When you use mutable objects as keys in hashed collections, changing them breaks contracts.
Problems ๐
Lost Values
Hard Debugging
The Least Surprise Principle Violation
Unexpected Behavior
Solutions ๐
Use immutable objects as keys.
Overr...
maximilianocontieri.com3 min read