My OCD makes me add \"break\" when writing case statements, even if they will not be executed. Consider the following code example:
switch(option) {
cas
I agree with having a break in a final default case, and don't agree with breaks after returns. (A colleague does those and it hurts my eyes.)
I also indent switches so as to reduce proliferation of indent levels. :) i.e.:
switch(option) {
case 1:
a = 1;
b = 7;
break;
case 2:
a = 2;
b = 4;
return -1;
default:
a = -1;
break;
}
(I also think that, since the return statement is not a function, it isn't appropriate to enforce a superfluous style that makes it look like one.)