3 ms·
The solution is to just let it be. A why comment encodes the programmer's belief at the time. This is very useful. Just because the comment is at odds with wha
by kazinator 4y ago
The solution is to just let it be. A why comment encodes the programmer's belief at the time. This is very useful.
Just because the comment is at odds with what the code is doing doesn't mean that the code is right. The code wins by force because the comment isn't executable.
Sometimes the comment is at odds with the code because the code should be the way the comment says. It's not that way because (1) someone changed it. Or (2) it never was that way; the comment is just wishful thinking.
If you want to know which of those two it is, you do the archaeology.