style #1 is good for its tendency to properly bind things together. Notice how the else statement tightly binds the two potential blocks together.
void doesSomething(int x) { if (x) { // stuff } else { // stuff }}
With style #1, do/while loops are tightly integrated with the block structure.
void doesSomething(int x) { do { // stuff } while (--x > 0);}
Under style #2, it becomes difficult to differentiate a do/while loop from an empty while loop; the integration is much looser.
void doesSomething(int x) { do { // stuff } while (--x > 0);}
The same problem comes up with for loops, as richardurich mentioned. Under style #2, if you remove the for line, the code will remain meaningful, but with a different meaning. The code is written as if the for line were a sibling of the brace line while, as far as the meaning is concerned, they basically the same. Actually, the brace takes the place of the single expression after the conditional to create the multi-expression block, so it should either be indented or placed on the same line.
void doesSomething(int x){ for (int i; i < x; ++i) x--; { int x; // stuff }}
Orphaned scopes can be useful for avoiding pollution. With style #1, they are easy to recognize. Under style #2, they could easily be mistaken for a loop, as in the previous example.
However, single expressions after conditionals (is there a correct word for these?) are harder to recognize under style #1, especially if the conditional is really long.
void doesSomething(int x) { if (x != 1 && ...) // pretend this conditional extends out of view x = 0; if (x != 1 && ...) { // pretend this conditional extends out of view x = 0; } // your only clue is the closing brace}
[Edited by - dcosborn on August 20, 2006 1:03:27 PM]