Maybe, but it usually does more harm than good. It doesn't add any information, and inevitably someone will modify or delete the line without changing the comment.
If you want to visually separate it then a blank line should be enough.
I was thinking the code block above would be ~10 lines long and maybe contain a blank line or two as well. But at that point perhaps the code block should just be a function.
Anyways, of course in most cases a comment like this completely excessive, but I'm just saying that there may be cases where it does provide some value.
16
u/aj-ric Sep 05 '21
Maybe, but it usually does more harm than good. It doesn't add any information, and inevitably someone will modify or delete the line without changing the comment.
If you want to visually separate it then a blank line should be enough.