
Preprocessor Abuse and Optional Parentheses - kryptiskt
https://mikeash.com/pyblog/friday-qa-2015-03-20-preprocessor-abuse-and-optional-parentheses.html
======
cardiffspaceman
I feel like I just read a subliminal promotion for the lambda calculus.

~~~
mikeash
Not my intent, but maybe I wrote it that way subliminally too.

------
DonHopkins
An old Macrology trick for passing expressions with commas and all kinds of
other punctuation to macros is to define the gobbledygook as one macro, and
then pass its name to the other macro as a parameter.

~~~
mikeash
Another way is to just use a macro that returns its argument:

    
    
        #define WRAP(...) __VA_ARGS__
        SOME_MACRO(WRAP(a, b, c), d)
    

But I wanted something that let me just wrap the thing in parentheses without
anything extra. Foolhardy, since it was a bunch of work and thought for an
extremely small gain, but at least I got a fun article out of it.

