RE: JavaMemoryModel: Semantics of final and fixing the immutable String problem

From: David Holmes (
Date: Tue May 15 2001 - 22:21:21 EDT

Bill Pugh wrote:
> We have been unable to devise any other scheme that would allow
> efficient execution on an Alpha SMP, a DSM system, or any other
> system with a similarly weak memory model. But we are open to new
> solutions.

I understand, I just wanted to clarify that this was indeed the position
that we had ended up at.

So in terms of educating the programmers we need to reinforce the need to
document whether or not an "immutable" class really provides (what should we
call this?) "strong immutability" through the use of all final fields.
Conversely, for classes that are not "strongly immutable" programmers must
always share the object via a final, or even volatile, reference. Anything
upon which security (or any other "safety" property) relies must be
"strongly immutable".

David Holmes
JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:31 EDT