June 2018
Intermediate to advanced
280 pages
7h 46m
English
In Effective Java, Joshua Bloch offered the following advice: "Treat objects as immutable." The reason this advice needs to be taken into consideration in the OOP world lies in the fact that mutable code has many moving parts; it is too complex to be easily understood and fixed. Promoting immutability simplifies the code and allows developers to focus on the flow instead—not on the side effects that a piece of code could have. The worst side effects are the ones where a small change in one place can produce catastrophic results in another (Butterfly effect). A mutable code can sometimes be hard to parallelize and often resorts to different locks.
Read now
Unlock full access