DIP 50 - AST macros

Jacob Carlborg doob at me.com
Mon Nov 18 00:22:56 PST 2013


On 2013-11-17 21:52, Walter Bright wrote:

> 1. I don't believe we can decide on language features by analogy. D is
> complex enough that one can use analogy to justify anything.
>
> 2. You cannot do anything behind a function call - the 'return'
> discussed earlier, and async/await for another, i.e. operator
> overloading cannot introduce control flow, cannot introduce variables
> into the current scope, etc.

You can turn this:

BigInt(3) + 7;

Into something that is not 10.

You cannot do anything behind a macro. You cannot introduce new syntax.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list