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

Mark Rowe mrowe at apple.com
Thu Dec 3 17:59:42 PST 2009


On 2009-12-03, at 17:48, Michael Nordman wrote:

> what peter pitched and what mjs pitched are one and the same i think 

They are different.  Maciej's proposal was more conservative in that it only applies when multiple else blocks are present.
> * 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 

/ πr2

- Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091203/2cd44707/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3166 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091203/2cd44707/attachment.bin>


More information about the webkit-dev mailing list