3 ms·
I write such comments sometimes, the reason is simple: when a codebase has a lot of comments in general comments often act as separators of "groups of code" (an
by Crinus 7y ago
I write such comments sometimes, the reason is simple: when a codebase has a lot of comments in general comments often act as separators of "groups of code" (and often read like short prose), so seeing a bit of code not having them feels unbalanced and i add some generic comment. The comment acts more as a separator or header, in a "this is the part where we do XYZ", than anything else.
Also this has to be taken into account with syntax highlighting where comments are made to stand out. It doesn't work that much when comments use a faded out color (like some schemes use) or without syntax highlighting at all (well, except perhaps if you use ====== ALL CAPS COMMENTS ====== :-P).
- h0h0h0h0111 7y agoBut even then, "Set negative x values to 0" would be a more informative header than repetition of just one part of the statement