D scripting (c++ integration)

Lars Ivar Igesund larsivar at igesund.net
Tue Oct 3 11:29:38 PDT 2006


Georg Wrede wrote:

> mike wrote:
>> Maybe for DMD 3.0 ...
>> 
>> ' import std.compiler;
>> '
>> ' char[] source = "writefln(\"Hello World!\");";
>> ' void delegate() foo = compile(source);
>> ' foo();
>> 
>> That would be just awesome :-)
>> 
>> - mike
> 
> In addition to all the obvious, I'd say this is yet another thing that's
> not doable in C++. Compiling anything takes simply too long. But D, it's
> totally different.
> 
> And especially where the same program keeps compiling different stuff,
> then speed would become quite fast since the compiler wouldn't be
> discarded from memory.
> 
> "Blurring" this way the distinction and chasm between runtime and
> compile time should give us quite interesting new possibilities and
> avenues.
> 

I believe that the CS term for these possibilities are genetic programming
(which might or might not be used for genetic algorithms). Genetic
algorithms are quite common (although that term might not be used), and is
often seen as an AI technique. Genetic programming is probably not that
common, partially because it is not very obvious how it should be used;
What decides how sucessful a program is without it turning into an
algorithm itself? I know one company that say they use genetic programming
to find search queries (in a form of query language) for biological (DNA
searches and such) research, and then in an interactive environment where a
researcher can tune the generational environment while looking at the
search results unfold.

Definately very interesting :)

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource & #D: larsivi



More information about the Digitalmars-d mailing list