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

Adam Treat treat at kde.org
Fri Dec 4 06:30:03 PST 2009


On Thursday 03 December 2009 02:30:17 pm Kenneth Russell wrote:
> In the WebKit WebGL implementation I've frequently encountered the
> case where the else clause in a single if/else is a one-liner, and I
> find it both ugly and error-prone to have to remove its braces. I'd
> really like to be able to use braces on both arms.
>
> Perhaps existing code could be grandfathered in but new or modified
> code required to conform to the rule Peter proposes.
>
> -Ken

I'd like to lodge an objection on the grounds that the style guide is a matter 
of subjective opinion and rationally only serves to make our code consistent. 
I do not like changing this style guide as the fashion changes.

However, as Hyatt might note I do not have a personally substantive problem 
with this particular change as I'd actually prefer this if the style guide 
were being made up today.

It seems we keep changing the style guide as fashion changes.  It is meant to 
ensure consistency and readability.  This is a purely subjective change and I 
think unwarranted.

Cheers,
Adam


More information about the webkit-dev mailing list