D interpreter
Bruce Adams
tortoise_74 at yeah.who.co.uk
Wed Oct 24 17:38:46 PDT 2007
Gregor Richards Wrote:
> 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.
Ah I was hoping for D doubling as a dynamic language. Oh well.
> The CTFE interpreter is extremely limited (and slow).
>
Maybe it should use a VM? :)
> rebuild has a similar flag, but of course handles imports.
>
> I believe the gdmd wrapper of GDC already has this functionality.
>
> - Gregor Richards
Ah never heard of that one before I see it does pretty much what you say - compile and run.
Regards,
Bruce.
More information about the Digitalmars-d
mailing list