3 ms·
This stack overflow discussion summarizes pros of immutability reasonably well: http://stackoverflow.com/questions/1863515/pros-cons-of-immutability-vs-mutabili
by shoyer 12y ago
This stack overflow discussion summarizes pros of immutability reasonably well: http://stackoverflow.com/questions/1863515/pros-cons-of-immutability-vs-mutability http://stackoverflow.com/questions/1863515/pros-cons-of-immu...
The main reason is that mutable objects are more complex and thus harder to reason about (which leads to more bugs).