|
|
|
|
|
by krylon
4037 days ago
|
|
I find parens around a return value/expression slightly annoying, but not annoying enough to have a debate over it. It doesn't make the code harder to read, IMHO. Whitespace between a function name and the arguments is significant, however, because with a function-like macro, there must be no whitespace between the name and the opening parenthesis. I've seen the following code in production code, for example: #include <stdlib.h>
#define free(x) free(x), x = NULL
free(ptr1); // Macro
free (ptr2); // Call free(3) directly
(Whether or not such a macro is good idea is a different question entirely, the point is that you can prevent such macro-expansion by using whitespace. Aesthetically, I find it very disturbing, though.) |
|