What are AST Macros?

retard re at tard.com.invalid
Sun Jul 11 16:57:54 PDT 2010

Sun, 11 Jul 2010 22:03:56 +0000, pillsy wrote:

> == Quote from Don (nospam at nospam.com)'s article
>> Philippe Sigaud wrote:
> [...]
>> > String mixins sure are powerful, but I can't get ird of a feeling of
>> > 'cheating' when using them. Maybe with some kind of string
>> > interpolation they could be made more palatable to some?
>> There's little doubt that it's the part of the language which needs the
>> most attention in the long term. But the way forward is not at all
>> obvious. So it's been deferred.
> I'm not clear on how one is supposed to go about making the equivalent
> of hygienic macros using just string mixins and CTFE.

You can create a trial-and-error gensym function with compile time 
introspection and CTFE/templates. :o) It's very elegant. CTFE solves all 
your AST macro use cases.

More information about the Digitalmars-d mailing list