
24 Feb
2009
24 Feb
'09
10:17 a.m.
Hello Joern, Joern Huxhorn wrote:
Ok, I *do* understand what immutability is *supposed* to be about but reality is quite different. In the two languages that I know best - Java and C++ - constness and immutability can be circumvented easily.
The fact that immutability can be circumvented by technical means is in my opinion inconsequential. Marking an object instance immutable conveys intent. You can build additional logic on top of the immutability hypothesis. If someone intentionally circumvents immutability, the ensuing problems are theirs, not ours.
Joern.
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch