Re:Humans should think of sizeof() as a function, says Linus...
by nikai on Saturday May 30, 2015 @07:41AM
(#9629830)
Not even in C. You can have an if condition that is actually a macro that expands with parentheses. For example the macros in ctype.h, so you can actually write
[ Parent
| on HN ]
Re:Humans should think of sizeof() as a function, says Linus...
by cygx on Saturday May 30, 2015 @08:57AM
(#9630019)
That's not portable, though: A comforming implementation may very well implement islower as a function call, and you should treat is as such.
Re:Humans should think of sizeof() as a function, says Linus...
by raverbashing on Saturday May 30, 2015 @07:48AM
(#9629845)
Yeah, but macros are not really part of the language, they're more a writing aid than anything really.
So, for the sake of good practices, write if with parenthesis.