If I came across that code in my own code while browsing for something, I would likely correct the case #2 comment to reflect the code, assuming that I had copy/pasted it from a similar comment elsewhere (e.g. the Case #1 snippet) while forgetting to adjust it to match the actual code. I might, or I might not--depending on my mood, change both of them to the shorter form of $i++ and $i-- respectively. This might depend on whether I thought it more readable in its explicit form, or whether or not I might have arrived at that equation from something else, which might again need tweaking later, such as $i = $i + 2; (which of course could be written as $i += 2; as well, but, again, this may be less readable, depending on the context).
My habit for a comment of that nature is just to remind myself of what the code is doing; less often do I intend for the comment to be prescriptive...and my comments are far more likely to be out-of-date than the code itself when I have returned and made adjustments.
If, however, I found that in someone else's code, I would scrutinize that more carefully to see what it should actually be doing and whether the code, or the comment, should be corrected.
Blessings,
~Polyglot~
In reply to Re^5: Where to place POD
by Polyglot
in thread Where to place POD
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |