|
From: | Paul Eggert |
Subject: | Re: list, set, oset, map, omap: avoid imperative voice in documentation |
Date: | Mon, 3 Feb 2020 19:33:05 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
Plus, it's odd to use one style before a "{" and a different style after.
The real difference is: Am I talking to a user of the function? Or am I explaining the implementation details of the function?
When talking to a function's user, it's fine for the comment to stand for a call to the function. For example:
/* Clear the error indicator for STREAM. */ void clearerr (FILE *__stream);This comment is saying "'Clear the error indicator for STREAM' = 'clearerr (STREAM)'." In contrast, if we change the comment's "Clear" to "Clears" then the comment is saying something like "'Clears the error indicator for STREAM' is something that 'clearerr (STREAM)' does." which is indirect and awkward, or perhaps "'clearerr (STREAM)' clears the error indicator for STREAM." which is in reverse order of what the text says - and either way the "Clears" of the comment disagrees with the "clear" of the function name.
[Prev in Thread] | Current Thread | [Next in Thread] |