On Fri, Jan 10, 2014 at 08:53:44PM -0800, Andrei Alexandrescu wrote: > On 1/10/14 8:26 PM, Timon Gehr wrote: > >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 don't know. Need to think about it. Maybe it's a wrong design > decision (or maybe separate heaps are wrong). [...]
I dunno, separate heaps, esp. for immutable vs. mutable, seems like a very powerful GC optimization opportunity. Missing it seems like such a pity, esp. given the price we pay for immutability (transitivity, actual immutability guarantees unlike C/C++ const, etc.). T -- If you want to solve a problem, you need to address its root cause, not just its symptoms. Otherwise it's like treating cancer with Tylenol...
