|
|
|
|
|
by masklinn
1643 days ago
|
|
I think "why not" is one of those things which definitely does not belong in comments, if you regularly write up such justification, your code becomes mostly comments. Even more so than "positive" comments, "negative" comments belong in the commit message. Possibly unless your entire codebase is literate, and code is secondary to comments. |
|
During the development you are mostly likely looking at commits, or PRs, so that makes sense.
But if its long living piece of code, people will get you your code via following function/method chains or just browsing the source not commits. While you can use git blame, and then figure out the commit, and then read last few commit messages, putting comment on code is easier on everybody.