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

Jeremy Orlow jorlow at chromium.org
Fri Dec 4 09:17:03 PST 2009


On Fri, Dec 4, 2009 at 6:30 AM, Adam Treat <treat at kde.org> wrote:

> 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.
>

I'm not necessarily disagreeing with your conclusion, but I have to ask: can
you think of an example of a style change that isn't subjective and/or
something that can change as "the fashion" (or, more likely, the developers
working on the project) changes?  Even stuff like the namespace change
really depends on your development style (to determine whether or not you
care about those 4 extra spaces "wasted").
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091204/6ec5649a/attachment.html>


More information about the webkit-dev mailing list