On 01/07/2014 02:23 PM, Boris Zbarsky wrote: > One reason I've seen 2 preferred to 4 (apart from keeping line lengths down) > is that: > > if (somethingHere() && > somethingElse()) > doSomething(); > > is less clear about what's condition and what's body the if body is than: > > if (somethingHere() && > somethingElse()) > doSomething(); > > but this would obviously also be affected by the bracing policy.
Regarding the effect of the bracing policy, SpiderMonkey used to have if (somethingHere() && somethingElse()) { doSomething(); } which was unreadable. You simply can't easily skim and see where the body starts and where the condition ends, even with braces. We shoved the opening brace to its own line: if (somethingHere() && somethingElse()) { doSomething(); } It doesn't seem to me that the four-space issue here is helped by braces in end-of-line configuration. Jeff _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform