Greg Turner gmturner007@ameritech.net writes:
I guess the argument against this is that it creates code duplication. The argument for it is more obvious (reduces insanity). In general, should I avoid submitting patches with big nasty #define's that are really inline functions like this, even at the expense of duplicating some code?
Yes, a bit of code duplication is better than such massive macro abuse. And if the duplicated code becomes too large, you can either split it into separate functions, or implement the A function by converting strings and calling the W function.