On Dec 3, 2009, at 5:48 PM, Michael Nordman wrote:
what peter pitched and what mjs pitched are one and the same i think
* When all arms of a conditional or loop are one physical line, do
not use braces. If any arms are more than one physical line (even
if they are one logical line), use braces on all arms.
One possible conservative modification to the rule is that if you
have a multi-block if ... else if ... else chain, then if even one
body has braces, all should. I think that would tend to reduce
rather than increase visual noise, as all the "else" keywords would
line up where right now they look ragged.
To be clear: my intent was to propose something different than Peter's
suggestion. Specifically, I suggest we do *not* change the rule for a
simple if/else statement with only two clauses. Those would still be
able to have braces on only one of the two clauses. But if/else chains
of more than two clauses would have to be consistent.
For anyone who agreed with my suggestion, you may want to consider
whether you still agree in light of this clarification.
Regards,
Maciej
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev