Python eval() equivalent in Dlang working in Runtime?

H. S. Teoh hsteoh at quickfur.ath.cx
Fri May 1 18:52:34 UTC 2020


On Fri, May 01, 2020 at 06:37:41PM +0000, tsbockman via Digitalmars-d-learn wrote:
> On Friday, 1 May 2020 at 18:07:54 UTC, H. S. Teoh wrote:
[...]
> > Actually, if you're willing to ship a working copy of dmd with your
> > program, you *could* compile D code on-the-fly and dynamically load
> > it as a dll/shared library.
> 
> Good to know, but that's quite different from the eval() of
> interpreted languages with respect to both semantics and performance,
> so it's really another item for the "D alternatives to eval()" list.

True.  I will say, though, that dmd is fast enough that unless you're
compiling large code snippets or doing it inside an inner loop, you
might not notice the slight pause!


T

-- 
Turning your clock 15 minutes ahead won't cure lateness---you're just making time go faster!


More information about the Digitalmars-d-learn mailing list