Mixin versus c++ preprocessor?
Bill Baxter
dnewsgroup at billbaxter.com
Sat Mar 22 13:26:45 PDT 2008
Tim Burrell wrote:
> Tom S wrote:
> But, its original intent was sound, and I think it could be possible to
> include a preprocessing step that doesn't allow for easy obfuscation of
> code, or crazy code block bugs (anyone remember the while(0) hack?). I
> don't think it would be a sin at all to include a safe and modified
> subset of a C style preprocessor to D. Although I realize that's never
> going to happen, so it's probably pointless to bother thinking about :).
That's pretty much exactly the idea behind AST macros.
> Either way, as bearophile suggested, I think the AST macros should do
> the trick (I wasn't ware of them when I made my initial reply), so no
> worries.
Yep.
--bb
More information about the Digitalmars-d-learn
mailing list