What are AST Macros?

Don nospam at nospam.com
Sun Jul 11 05:56:05 PDT 2010


Philippe Sigaud wrote:
> Don wrote:
> 
> 
>     Part of what happened was that at the conference, I showed that the
>     functionality of string mixins was a superset of what was planned
>     for AST macros. Since that time, there has not been any kind of
>     proposal, or even a concept. So it's a bit meaningless to talk about
>     "AST macros" right now as if they were a
>     planned-but-not-yet-implemented feature.
> 
> 
> That's interesting. Do you have a link or any text I could read on that? 

Not really, it was just casual discussion on a whiteboard after the 
conference. I did post some example code on the newsgroup (announce, I 
think) which did lexing + parsing + basic semantic analysis in 300 lines 
of code. It gives an idea of what AST macros would need to be able to do.

> 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.


More information about the Digitalmars-d mailing list