DMDScript now under Boost license

Adam Ruppe destructionator at gmail.com
Mon Mar 29 10:41:46 PDT 2010


I think it would be pretty great if you could add functions, etc., to
the scripting language with a simple one liner:

mixin makeAccessibleFromScript!(scriptEngine, foo);

Or something similar. The template there could mix in a wrapper
function for whatever foo() happens to be, and register it with the
scripting engine all in one call.

Then, to call a function defined in script, you should be able to just
do callScriptFunction("name", args...);, but this is optional; I say
getting D functions accessible from the script with ease is more
important.


Anyway, you take that and the dmdscript and package them together as
an D extender library. To use it, you just import the script module,
mixin the template to extend it, and boom, done.


Perhaps down the line, a magic function could even look for
@scriptable attributes* and add them automatically. But no need
immediately.

* I'll say again, I'd love to have user defined attributes accessible
from __traits for just this kind of thing.

On 3/29/10, Walter Bright <newshound1 at digitalmars.com> wrote:
> strtr wrote:
>> Walter Bright Wrote:
>>
>>> http://www.digitalmars.com/dscript/index.html
>>
>> Would it be possible to have some sort of scripting as part of D?
>
> What did you have in mind?
>


More information about the Digitalmars-d-announce mailing list