Am 11.01.2014 05:26, schrieb Timon Gehr:
On 01/10/2014 09:03 AM, Andrei Alexandrescu wrote:
* There will be no possibility to change the type of certain objects
once allocated. An allocation for an immutable object cannot e.g. make
it later a mutable one. (This is an essential issue with the current
allocator, I think.)
I assume you are aware that there is implicit casting to immutable upon
return from a strongly pure function. What about it?
I'd say the easiest way to deal with it is to let the compiler emit a
"gc_isolatedToImmutable"-like call in this case which moves the object
from one heap to another, assuming that the language guarantees safety.