[webkit-dev] Should we ever change style guidelines?

Adam Treat treat at kde.org
Thu Dec 10 11:28:44 PST 2009


On Thursday 10 December 2009 01:34:12 pm Peter Kasting wrote:
> But if "!color.green()" is potentially confusing, then certainly it is just
> as confusing (in fact moreso) without the surrounding "color.blue()" and
> "color.red()" tests in Adam's example.  Yet Adam cited "consistency with
> surroundings" as the reason to prefer == 0 in this case, which suggests
> that he'd be fine with an isolated test of this value.

It doesn't suggest anything of the sort.  The two cases are not mutually 
incompatible; both are confusing and in my mind call for exercising reviewer 
discretion over the style guide.

> My point is that your argument (and Adam's) is not actually an argument for
> reviewer discretion, or promoting consistency over whatever the style guide
> says; it's an argument that the style guide is wrong to prefer "!foo" over
> "foo == 0".

No, *it is* an argument for reviewer discretion.  And I *do not* think the 
style guide is wrong for the *guide* to prefer "!foo" over "foo == 0"!

I just think there are exceptions.   And that in the end we have to trust in 
the compiler and the reviewer's judgement.

Cheers,
Adam


More information about the webkit-dev mailing list