runtime evaluation

Marco Leise Marco.Leise at gmx.de
Sat Dec 14 05:43:49 PST 2013


Am Sat, 14 Dec 2013 13:15:13 +0100
schrieb "hoya" <sighoya at gmail.com>:

> If I read it correctly, there is no possibility to create 
> classes, structs, templates, functions or to import libs at 
> runtime.

You can load libraries at runtime like OpenGL or a database
driver. This applies to all C and D libraries as well as C++
libraries to some extent.

> Is there already an approach to add some functionality?
> I know, that D is a compiled language, but Java is too and 
> supports class loading at runtime or more in general: runtime 
> evaluation.

Did something change in recent Java versions? E.g. to get a
create a new class I needed the JDK around (not just the JRE)
for the compiler, which had to be added to the classpath first.
I wouldn't have considered that a 1st class language feature.
After all you compile your source code first with the optional
development tools and then load the resulting class file which
is not much different from calling the D compiler on some D
source to create a library and loading that.
Or does Java have an eval() method of some sort now?

-- 
Marco



More information about the Digitalmars-d mailing list