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 _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev