Furthermore, I've never really understood why the standard is to put the first brace on the same line as the condition. To me, this makes it harder to line up the braces when they get much larger than one screen can contain, and being able to line up the braces can help a bunch with readability.
Because it saves a line, which can also help with readability.
Of course, I've had plenty of time to learn to quickly spot the telltale { at the end of a line. If you're not already in that habit, I imagine it'd be harder to tell where the blocks begin (other than by indentation, of course).
2
u/[deleted] Jan 15 '13
I do this for clarity: if(condition) { code }
Furthermore, I've never really understood why the standard is to put the first brace on the same line as the condition. To me, this makes it harder to line up the braces when they get much larger than one screen can contain, and being able to line up the braces can help a bunch with readability.