Expose the CTFE interpter in Phobos?

Paulo Pinto pjmlp at progtools.org
Tue Jul 26 07:47:24 PDT 2011


Hi,

at least in .Net case there is no interpretation going on. All code is
JITted, the bytecodes are only used as file representation.

--
Paulo

"Peter Alexander" <peter.alexander.au at gmail.com> wrote in message 
news:j0k8pm$29e3$1 at digitalmars.com...
> CTFE isn't really an interpreter in the traditional sense. I believe it 
> just uses the parsed source in its IR form, which is different from normal 
> byte code interpreters (and also slower). I'm guessing here though, so I 
> could be wrong.
>
> Whether I'm right or wrong though, I don't see much use for this. As you 
> said:
>
> - CTFE is limited.
> - You'd need nearly the whole D compiler, as well as the standard library 
> and runtime.
> - It would be slower than other scripting languages (unless given lots of 
> attention).
> - D wasn't made to be a scripting language.
>
> The most important thing is simply that CTFE is a function evaluator. For 
> scripting, that's pretty much useless. You need an entire virtual machine 
> that you can call into, one that has state and can bind into your main 
> application.
>
> I think this would be a lot of work for little gain.
> 




More information about the Digitalmars-d mailing list