Mixin versus c++ preprocessor?

Tim Burrell tim at timburrell.net
Fri Mar 21 16:00:59 PDT 2008


bearophile wrote:
> Tim Burrell:
>> Mixins are great, but in no way a replacement for the C preprocessor.  I 
>> think it was a big mistake to not include preprocessing as well.
> 
> The C preprocessor is powerful, but it's a source of many problems too. I presume that D AST macros will solve most of those problems (and they will create other problems: macros are a Pandora's jar).

It's true it can cause problems.  Still sometimes it'd just be really 
nice to be able to make some simple #define's -- even if just to help 
porting code.

At any rate, I think you're right, the AST macros look like they should 
do the trick for the most part.


More information about the Digitalmars-d-learn mailing list