3 ms·
I think that quote is about complex code. We tend to look at macros as dangerous, but this is a pretty clean usage of macros, it's basically a function that tu
by stephth 14y ago
I think that quote is about complex code.
We tend to look at macros as dangerous, but this is a pretty clean usage of macros, it's basically a function that turns the arguments into a string. Simple and easy to debug. Don't you think?
Edit: Discussion about that quote: http://stackoverflow.com/questions/1103299/help-me-understand-this-brian-kernighan-quote http://stackoverflow.com/questions/1103299/help-me-understan...
- falling 14y agoIt’s a simple macro that makes you write code that looks like a syntax error, and I don’t like that (http://www.codinghorror.com/blog/2006/05/code-smells.html http://www.codinghorror.com/blog/2006/05/code-smells.html). Especially since without the macro you’d just need to write two characters more or, even better, a clearly named constant, like kNSRAllProperties.