Book chapter
The Impact of Object Immutability on the Java Class Size
According to the subjective opinions of many industry experts, object immutability is a virtue in object-oriented programming, since it leads to side-effect-free design, cleaner code, better concurrency, and many other factors. However, it has never been empirically demonstrated exactly how immutability affects quality metrics of object-oriented programs. In the following research, we analyzed 97508 classes from 240 public Java repositories to find out how immutability affects the size of the code.