Tom Ritchford
1 min readJan 23, 2020

--

Oh, please don’t get me wrong, immutability is a fantastic property for your data structure to have!

Suddenly all sorts of problems vanish as if they never existed — thread issues, that dreadful issue when your container now has missing or extra elements that “you” didn’t add.

I once worked in a team that actively despised the idea of immutability “because efficiency” (see: premature optimization) so everything was done with mutations.

Of course, you’d pass these mutable things everywhere, and they’d change underneath you while you were working, and havoc ensured — every single week.

--

--

No responses yet