Re:Golden rules for becoming a better programmer
by yoklov on Wednesday January 27, 2016 @02:36AM
(#10978789)
Yep, and often the code that breaks what the comment says is far away. Too easy to change something that subtly invalidates a comment in some other module. Especially if you didn't write that module.
Re:Golden rules for becoming a better programmer
by mannykannot on Wednesday January 27, 2016 @08:15AM
(#10979835)
It is also possible that your change subtly invalidates the semantics implied by the identifiers used in some other module. In either case, there is a nontrivial possibility that you have introduced a bug (and quite possibly a subtle one).
Re:Golden rules for becoming a better programmer
by mannykannot on Wednesday January 27, 2016 @08:08AM
(#10979799)
Variable and function names can be just as misleading as comments. I am not aware of any language which guarantees the semantics implied by your choice of identifiers.
If the code is written with meaningful variable and function names, and functions no larger than a screen, then lack of comments isn't really a problem.