Steven Schveighoffer:

> Casting to immutable is the only way to create such a beast.

Then maybe we have to improve the language semantics to allow a better 
solution. See the Transients of Clojure or the larval objects of Java :-)

The compiler may need to test (at compile time) that there's only one reference 
to the AA and its contents, and turn it into immutable.

Bye,
bearophile

Reply via email to