obj file for mixin?
Daniel Keep
daniel.keep+lists at gmail.com
Sat Jan 13 00:34:13 PST 2007
kenny wrote:
> Are there any examples of this anywhere? This sounds very very
> interesting to me. Actually so interesting that, you may have just
> changed the way I was going to implement something ;)
>
> Does that mean that I can essentially use D as a scripting language?
>
> *Can't contain excitement!*
I haven't looked at it in a while, but I think Mango does this for its'
build scripts (or they might have removed that).
Also, I did something similar with the build scripts for my cairo
bindings (they're up at dsource.org/projects/bindings/ somewhere, I
believe).
So yes, you *can* use D as a kinda scripting language. Just keep in
mind that if you write a scripting library, instead of:
> module my_lib;
> void some_func();
> class Foo { }
You need to do this:
> module my_lib;
> template my_lib {
> void some_func();
> class Foo { }
> }
And then do this in your script:
> mixin my_lib.my_lib;
-- Daniel
More information about the Digitalmars-d
mailing list