DIP 50 - AST macros

Walter Bright newshound2 at digitalmars.com
Thu Nov 14 12:54:00 PST 2013


On 11/14/2013 11:18 AM, Jacob Carlborg wrote:
> AST macros cannot change the syntax or introduce new syntax. C preprocessor
> macros and AST macros are not the same. I'm starting to regret that I called it
> "macros".

If it is powerful enough to do async/await but look like normal D syntax, then 
is going to suffer from these faults.

(A lot of the C++ macro abuse looks like normal syntax to the user, but it 
behaves in a way that the casual user would find completely unexpected. In the 
same vein, macro assembler abuse of macros did not introduce new syntax - the 
syntax for the macros was straightforward. It was what those macros *did* that 
made them incomprehensible.)


More information about the Digitalmars-d mailing list