(?)
Quotes are added by the Goodreads community and are not verified by Goodreads. (Learn more)

“Immutable objects are simple. They can only be in one state, which is carefully controlled by the constructor. One of the most difficult elements of program design is reasoning about the possible states of complex objects. Reasoning about the state of immutable objects, on the other hand, is trivial.

Immutable objects are also safer. Passing a mutable object to untrusted code, or otherwise publishing it where untrusted code could find it, is dangerous — the untrusted code might modify its state, or, worse, retain a reference to it and modify its state later from another thread. On the other hand, immutable objects cannot be subverted in this manner by malicious or buggy code, so they are safe to share and publish freely without the need to make defensive copies.”

Brian Goetz, Java Concurrency in Practice
Read more quotes from Brian Goetz


Share this quote:
Share on Twitter

Friends Who Liked This Quote

To see what your friends thought of this quote, please sign up!


This Quote Is From

Java Concurrency in Practice Java Concurrency in Practice by Brian Goetz
2,894 ratings, average rating, 138 reviews
Open Preview

Browse By Tag