What are AST Macros?

Nick Sabalausky a at a.a
Tue Jul 13 00:38:42 PDT 2010


"Rainer Deyke" <rainerd at eldwood.com> wrote in message 
news:i1h52o$2kb7$1 at digitalmars.com...
> On 7/13/2010 01:03, Nick Sabalausky wrote:
>> "Rainer Deyke" <rainerd at eldwood.com> wrote in message
>> news:i1gs16$1oj3$1 at digitalmars.com...
>>> The great strength of string mixins is that you can use them to add the
>>> AST macros to D.  The great weakness of string mixins is that doing so
>>> requires a full (and extendable) CTFE D parser, and that no such parser
>>> is provided by Phobos.
>>
>> Seems to me that would lead to unnecessary decreases in compilation
>> performance. Such as superfluous re-parsing. And depending how exactly 
>> DMD
>> does CTFE, a CTFE D parser could be slower than just simply having DMD do
>> the parsing directly.
>
> True. I tend to ignore compile-time costs.  The performance of computers
> is increasing exponentially.  The length of the average computer program
> is more or less stable.  Therefore this particular problem will
> eventually solve itself.
>

The people behind C++ probably thought the same thing ;)

> Of course, this is just my perspective as a developer who uses a
> compiler maybe twenty times a day.  If I was writing my own compiler
> which was going to be used thousands of times a day by thousands of
> different developers, I'd have a different attitude.
> 



More information about the Digitalmars-d mailing list