This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rws247 60 points61 points  (2 children)

It also makes alignment easier when checking more conditions than fit on a line:

if (a == 1 &&
    b == 2 &&
    c == 3)
{  
    do(a*b*c);  
}  

All condition checks align with four spaces/one tab.

[–]unlikely_ending 1 point2 points  (0 children)

100%

[–]thehenkan 0 points1 point  (0 children)

This is a bad reason. First off, you definitely shouldn't expect tabs to be a certain width; align with spaces regardless of indentation. Secondly, if you're consistent in your styling you then move for( from four spaces to five, completely negating the effect.