Why is D unpopular?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sat May 14 05:37:39 UTC 2022


On Saturday, 14 May 2022 at 01:42:21 UTC, Walter Bright wrote:
> I spoke with Atila a year ago on his excellent dpp. He handles 
> the metaprogramming macros with a handbuilt translation of 
> them. This works, but has to be constantly tuned. The lack of a 
> general solution was what I was referring to.

Just extend D so that it accepts C code, then macro expansion 
will work. You are 90% there already.

Or rather, extend C so that it accepts D code.

So when you expand $MACRONAME(param) you inject a C-context that 
accepts D  mixed in.

Should work 99.9% of the time. That is good enough, now you only 
have to manually deal with 1 in 1000. 90% is not good enough, as 
that means dealing manually with 1 in 10...


More information about the Digitalmars-d mailing list