It may seem odd to have a command in C++ (or any other programming language)
that’s specifically ignored by the computer. However, all computer languages
have some version of the comment. It’s critical that the programmer
explain what was going through her mind when she wrote the code. A programmer’s
thoughts may not be obvious to the next colleague who picks up
her program and tries to use it or modify it. In fact, the programmer herself
may forget what her program meant if she looks at it months after writing the
original code and has left no clue.
Name:
Anonymous2008-02-06 10:26
>>8 Comments are not *code documentation*. I don't mind having to deal with 10.000 lines with 0 comments if there's a complete document that documents (duh) the behavior of the code.
Separating documentation from code is unnatural and cumbersome.