i.e, if(x) { /* blah */ } vs. if (x) { /* blah /* }. I never understood why anyone would use the second style, it's not like it makes the code substantially easier to read (in fact, I think it's aesthetically worse and more distracting), and it wastes line capacity.
Name:
Anonymous2010-03-04 11:24
I always assumed the idea was to allow no ambiguity between the if and formal functions, the latter which typically require no space between the call and the parameter parentheses. I'm sure some people also do this as a matter of subjective readability or, to enforce a sort of personal consistency, most often they do it one way or another and they decide they'll do it that way. It's rather like the difference between:
int test() {
return 0;
}
and: int test()
{
return 0;
}
Here's one. How often do you/when do you (x - 1) as opposed to (x-1)? Which do you prefer? x++, x += 1, or x = x + 1?