[webkit-dev] Proposing style guide change regarding braces on conditional arms

Michael Nordman michaeln at google.com
Thu Dec 3 17:48:00 PST 2009


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.
>>
>>
+1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091203/ac4612da/attachment.html>


More information about the webkit-dev mailing list