Will macros work with expressions?

Jari-Matti Mäkelä jmjmak at utu.fi.invalid
Wed Sep 5 00:58:34 PDT 2007


Robert Fraser wrote:
> Jari-Matti Mäkelä Wrote:

>> If I understood it correctly, the macros only do a simple substitution
>> using their parameters, hide symbols when necessary (hygiene) and then
>> attach the generated code to the AST.
> 
> I think that's about right, but remember that their parameters can
> specialize on any pattern and extract parts of the expression, which I
> think is the most exciting feature.

Ah, good point. That would make overloading and recursive calls the primary
control flow constructs then. Given enough power they could surely handle
the task. Let's just hope the size and time complexity of macro invocations
won't get too large.



More information about the Digitalmars-d mailing list