[webkit-dev] Fwd: coding style and comments

Ryosuke Niwa rniwa at webkit.org
Mon Jan 31 00:47:37 PST 2011

On Fri, Jan 28, 2011 at 10:21 AM, Peter Kasting <pkasting at google.com> wrote:

> On Fri, Jan 28, 2011 at 10:14 AM, Alexey Proskuryakov <ap at webkit.org>wrote:
>> Do you have any specific mechanism in mind for keeping global comments
>> accurate?
> No more than I have for keeping API usage or function implementations
> correct; that is, if we have comments, they must be as important to
> reviewers and patch authors as the code is.

How can we ensure that all comments are up to do date?  For example, suppose
function A calls B, and B calls C.  Then in the call site of A, I comment
"Because A does X, we do Y."  Now suppose for the moment that the behavior X
of A is implemented by C.

We then come back and modify C, thereby modifying the behavior X of A to X'.
 We suddenly have a wrong comment in the call site of A and we need to fix
it!  But how do we know that if the patch only changed one line in C?

- Ryosuke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110131/3fc55ba5/attachment.html>

More information about the webkit-dev mailing list