Ref counting for CTFE?

Dylan Knutson via Digitalmars-d digitalmars-d at puremagic.com
Thu May 29 09:53:54 PDT 2014


I'm not well acquainted with how the compiler works internally, 
or how CTFE is implemented. But it seems like a full-blown D 
interpreter with eval functionality is needed. Lots of scripting 
language interpreters exist out there, and they all get 
relatively decent performance and memory footprints (or at least 
much better than what DMD can get when performing CTFE).

Is there anything so radically different in D than these other 
languages, that prevents the implementation of a run-of-the-mill 
VM to eval D code? It just seems strange to me that it's such a 
problem when this is basically solved by all scripting languages. 
And I'm really not trying to downplay the difficulty in 
implementing CTFE in D, but rather just figure out why it's so 
hard to implement in comparison.


More information about the Digitalmars-d mailing list