5 ms·
It's good until you rewrite the function to use a different algorithm, but forget to update the comment. After that, it's a confusing contradiction that will sl
by moss 18y ago
It's good until you rewrite the function to use a different algorithm, but forget to update the comment. After that, it's a confusing contradiction that will slow down anyone who tries to read the code.
If the code is genuinely hard to follow without it, it's probably still worth leaving a comment, but recognize that there are real costs to balance out the benefits of commenting.