03.12.2010, в 13:54, Eric Seidel написал(а):

> I'm not sure we have any examples of bool passing like that in real code.


We do, although I can't provide one now. I just remember this being discussed 
in bug review.

I think that Dave's rule is best here, even if it meant that we couldn't check 
it automatically. But I think that we can try - just complain each time true or 
false is passed into a function. That may prove to be too chatty though.

03.12.2010, в 13:55, Nico Weber написал(а):

> Out of curiosity, what do people think of
> 
> doSomethingElse(/*paramName=*/true);

There is a horrible failure case - if the comment is wrong (or gets wrong after 
a refactoring made elsewhere), it gets much worse than an unannotated boolean 
argument.

- WBR, Alexey Proskuryakov

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to