2 ms·
Why #define Is Evil
- trebor 15y ago#define is one of the reasons I don't touch most C code. While yes, you can use it to determine environment and load appropriate modules it is abused so often to either obfuscate "open source" code or to inline something. If #define had been simpler I might've cut my teeth on C instead of Object Pascal.
- asto 15y agoFrom page 76 (on macros) of K&R: "The expressions are evaluated twice; this is bad if they involve side effects like increment operators or input and output."