3 ms·
Their point is you should have const int MAGIC_THING = 0xdeadbeef & then say MAGIC_THING throughout the code, rather than using 0xdeadbeef in all your express
by __s 7y ago
Their point is you should have
const int MAGIC_THING = 0xdeadbeef
& then say MAGIC_THING throughout the code, rather than using 0xdeadbeef in all your expressions
- klyrs 7y agoSure. But OP said not to use numeric literals, which 0xdeadbeef certainly is.
- wpietri 7y agoIn case you somehow haven't figured it out by now, he meant in the body of one's code. He's fine with named constants. Protip: If a smart person says something that seems obviously dumb to you, it's worth trying to find an interpretation that isn't dumb. Doubly so when, as here, it's from a piece that others are clearly finding smart and useful.