Search This Blog

Thursday, November 22, 2018

Immutability is a low-cost way to ensure your code is decoupled.

It allows you to control how objects in your system are allowed to be changed.

This can be very helpful in a multithreaded program. Many of the bugs and obscure edge cases that cause code to not be thread-safe arise because of mutation.