October 2004
Intermediate to advanced
240 pages
6h 22m
English
TO_PUT_IT_BLUNTLY: Macros are the bluntest instrument of C and C++’s abstraction facilities, ravenous wolves in functions’ clothing, hard to tame, marching to their own beat all over your scopes. Avoid them.
It’s hard to find language that’s colorful enough to describe macros, but we’ll try. To quote from [Sutter04] §31:
Macros are obnoxious, smelly, sheet-hogging bedfellows for several reasons, most of which are related to the fact that they are a glorified text-substitution facility whose effects are applied during preprocessing, before any C++ syntax and semantic rules can even begin to apply.
Lest there remain any ambiguity on this point, we note also that Bjarne Stroustrup has written:
I dislike most ...