D interpreter
Bruce Adams
tortoise_74 at yeah.who.co.uk
Wed Oct 24 17:48:37 PDT 2007
Bruce Adams Wrote:
> 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.
>
Actually the only thing missing to make this work is a cleverer import.
One which could trigger compilation either when read or with more complexity "just in time". This feature might also make build management simpler. It would be a cool blurring of the line between a compiled and an interpreted language but no doubt you'll all reply telling me what a sick puppy I am and why. :)
Regards,
Bruce.
Just let me at that front end and I'll have some fun hacking it in to a pseudo-interpreter - muhaha.
More information about the Digitalmars-d
mailing list