Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
nikai
10y ago
0 comments
Share
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
if islower(c) { (..) }
0 comments
default
newest
oldest
cygx
10y ago
That's not portable, though: A comforming implementation may very well implement
islower
as a function call, and you should treat is as such.
raverbashing
10y ago
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.
olavk
10y ago
That is cheating!
j
/
k
navigate · click thread line to collapse