People have shunned proposals to have @mixin functions because it wouldn't
be obvious at call site that some statement is executed under a mixin
(which could access all variables in scope etc).

The same will happen here; I think it should be clear at call site that a
macro is used.
How about:

macro!myAssert(1 + 2 == 4);
instead of myAssert(1 + 2 == 4);



On Sun, Nov 10, 2013 at 1:20 PM, Jacob Carlborg <[email protected]> wrote:

> I've been thinking quite long of how AST macros could look like in D. I've
> been posting my vision of AST macros here in the newsgroup a couple of
> times already. I've now been asked to create a DIP out of it, so here it is:
>
> http://wiki.dlang.org/DIP50
>
> --
> /Jacob Carlborg
>

Reply via email to