Please don't listen to this. The only place you really want comments is
a) at the top of files, describing the point of the file;
b) at the top of functions, if the purpose of the function is not obvious;
c) in line, when the code is not obvious.
If you are writing code that requires a comment for every line, you are
writing bad, obscure, unobvious code and no amount of commenting will fix
it.
The real reason to sparing in your comments is that code and comments are
not semantically bound to each other: the program doesn't stop working when
the comment becomes incorrect. It's incredibly frustrating to read a comment,
believe you understand what is going on, only to find out that the comment
and the code no longer match.
----- Larry McVoy lm at bitmover.com http://www.bitmover.com/lm - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
- Next message: Brian Gerst: "Re: Partition IDs in the New World TM"
- Previous message: Patrizio Bruno: "Re: lilo and removable media"