I dislike using
if ( x ) {
if ( y ) {
stuff;
}
}
(and no, I'm not flexible on the "it doesn't _really_ need a set of curlies" part either)
But I'm also religious about 80 character lines.
So if I need something like that and the lines are long, I do
if ( ( x ) &&
( y ) {
stuff;
}
(and yes, all boolean subexpressions need to be fully parened, even when order of operations would suffice)
I've got a few friends hooked on my style, if only because I'm more willing to help them with their code if its the way I like it. :) |