3 ms·
The biggest problem with C macros is that they are too opaque. The compilation stack will complain about code that is different from what you have, and leave yo
by marcosdumay 10y ago
The biggest problem with C macros is that they are too opaque. The compilation stack will complain about code that is different from what you have, and leave you with little hint about what in your code is generating the broken code. It's also confusing when debugging.
That said, yes they can lead to large gains so when they are worth it, go for them. Just mention in the documentation that they are macros, in big letters.
- magnetic 10y ago> Just mention in the documentation that they are macros, in big letters. The macros themselves are usually in BIG_LETTERS already... that generally gives it away.