AST macros
Walter Bright
newshound at digitalmars.com
Sat Mar 17 03:05:39 PDT 2007
Daniel Keep wrote:
> Question: in terms of usage, will these macros be like functions?
Yes. No !( ) syntax.
> Or
> will we able to define, say, a new kind of control structure with
> keywords?
No. Abner Hale thwacks such things with "abomination!"
> Or perhaps even a construct with a trailing curly brace block?
Yes.
> You spoil us Walter, you really do.
macros should be the final piece needed to make DSL's work nicely, and
they are actually rather simple conceptually and implementation-wise. I
tried for a long time to figure out how to make templates do the work,
until I finally realized that AST macros are *fundamentally different*
from templates.
A nice side benefit to macros is we should be able to deprecate lazy.
More information about the Digitalmars-d
mailing list