ponce

Jonathan M Davis jmdavisProg at gmx.com
Tue Nov 9 13:13:29 PST 2010


On Tuesday 09 November 2010 12:42:06 bearophile wrote:
> Don:
> > Yes. The rules will be:
> > * no globals (same as pure).
> > * no unsafe features (eg, no asm).
> > * source code must be available.
> > Everything else should work.
> 
> If a class is instantiated at compile-time the memory of its instance goes
> in the static mutable memory, but then the GC has to manage it
> differently, because you can't deallocate that memory. Is this a problem?
> It looks a little like the problems with scoped classes (that are now
> deprecated by Andrei).

Given that it's possible to serialize entire objects to disk in binary form, 
including all the references that they hold and whatnot in languages like Java, 
I'm sure that it would be possible to make it so that any objects allocated with 
new during CTFE would be in the dynamic heap during runtime.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list