D interpreter
Gregor Richards
Richards at codu.org
Wed Oct 24 14:10:05 PDT 2007
Bruce Adams wrote:
> Hi,
> Seeing the link:
>
> http://www.d-programming-language.org/
>
> posted in another thread reminded me that DMD sports a nifty D interpreter. Something I always wanted for C++ incidentally. With all the talk on virtual machines recently I was wondering how the D interpreter works.
>
> Does it compile and run? or use the embedded interpreter used for compile time evaluation? are these one and the same?
>
> What happens with imports? Are they interpreted or compiled on the fly or required to exist already?
>
> I know I should really try the experiment and find some of this out for myself.
>
> How hard would it be to duplicate this behaviour in the gdc front end?
>
The -run flag of DMD is anything but an interpreter. It's just a quick
way to run the binary after you've compiled it. It has all the same
semantics as compiling software with DMD directly, including all the fun
of imports. The CTFE interpreter is extremely limited (and slow).
rebuild has a similar flag, but of course handles imports.
I believe the gdmd wrapper of GDC already has this functionality.
- Gregor Richards
More information about the Digitalmars-d
mailing list