DIP 50 - AST macros

Timothee Cour thelastmammoth at gmail.com
Sun Nov 10 17:49:32 PST 2013


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 <doob at me.com> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131110/12c62fef/attachment.html>


More information about the Digitalmars-d mailing list