Little things that matter in language design: preprocessor support?
Little things that matter in language design: preprocessor support?
Posted Jun 10, 2013 14:08 UTC (Mon) by oever (guest, #987)In reply to: Little things that matter in language design: preprocessor support? by etienne
Parent article: Little things that matter in language design
Using preprocessor macros in C++ is strongly discouraged by Stroustrup. He says macros should only be used for include guards, something for which C++ has no other mechanism. For other cases can use constexpr, templates and
Macros allow any word (int, void, static, etc) in the code to be redefined which makes parsing the code impossible without knowing the macro definitions. I'd hate to see preprocessor use become more common.