[webkit-dev] Proposing style guide change regarding braces on conditional arms
Dirk Pranke
dpranke at chromium.org
Thu Dec 3 11:48:03 PST 2009
On Thu, Dec 3, 2009 at 11:36 AM, Jeremy Orlow <jorlow at chromium.org> wrote:
> On Thu, Dec 3, 2009 at 11:20 AM, Alexey Proskuryakov <ap at webkit.org> wrote:
>>
>> On 02.12.2009, at 23:35, Maciej Stachowiak wrote:
>>
>>> 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.
>>
>>
>> That would be my preference, too.
>
> I would like this.
>
While I personally believe every branch should be wrapped in braces,
it seems like we're not going to get consensus on that. I can live
with "no braces on any branch", but mixing brace-wrapped branches and
non-wrapped is really distasteful. So, I would vote for this
suggestion, as it gets us closer to what I believe is good.
-- Dirk
>
> On Thu, Dec 3, 2009 at 11:30 AM, Kenneth Russell <kbr at google.com> wrote:
>>
>> Perhaps existing code could be grandfathered in but new or modified
>> code required to conform to the rule Peter proposes.
>
> This is more or less the norm.
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
More information about the webkit-dev
mailing list