[webkit-dev] Comments in the code (Was Please include function-level comments in change log entries)

Maciej Stachowiak mjs at apple.com
Fri Jul 13 11:06:23 PDT 2012


On Jul 13, 2012, at 11:03 AM, Dana Jansens <danakj at chromium.org> wrote:

> On Fri, Jul 13, 2012 at 1:56 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> On Fri, Jul 13, 2012 at 5:57 AM, Stephen Chenney <schenney at chromium.org> wrote:
> 
> I don't doubt there are poor comments, both outdated and useless. That's a reviewing failure. You have simply highlighted the fact that any standard for comments requires reviewer attention. Hence "cost of maintaining comments".
> 
> I don't know how to review a patch and make sure all relevant comments are updated.
> 
> As I have illustrated before, you can be modifying a function X, then a completely random function A which calls B that in turn calls C that in turns D ... that in turn calls X may have a comment dependent on the previous behavior of X without ever mentioning X. How am I supposed to know that there is such a comment?
> 
> How is that different than the same question but replace "comment" with "behaviour"? In both cases A is no longer doing what it expected. Something is going to break, and A will have to be fixed/updated, comment included.

Wrong behavior can often be observed through automated testing. Wrong comments cannot.

 - Maciej


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120713/6c7622ee/attachment.html>


More information about the webkit-dev mailing list