mixin macros -- so tantalizing

Craig Black cblack at ara.com
Fri Sep 7 09:30:05 PDT 2007


> for example, something like:
>
> mixin alias foo func;
>
> which would declare func as a 'mixin alias' of foo.
>
> (of course, there's the 'macro' keyword as well; 'abstract' is also 
> interesting).
> allowing us to write:
>
> func(a+b*c);
>
> which would be instantly applicable. Almost all of the ugliness would 
> disappear from my BLADE code, for example.
> By contrast, I still haven't seen any use cases for the macros as 
> described in the conference presentation!

You've got my vote.  This sounds like a great feature that could be 
implemented easily.  Because it complements D features that already exist, 
you get a lot of capability for a little effort.

-Craig 





More information about the Digitalmars-d mailing list