Next badge 0/1
0 people reached
- 0 posts edited
- 0 helpful flags
- 13 votes cast
Is it efficient to attach a comment on every function?
@Caleb: Let's take Jave as an example. When I see comments like this one: "Called by all constructors to perform common initialization tasks. Sets all ivars to nil and adds this object to the command hierarchy. Overrides should call this method before doing anything else." This is not very useful at all. I don't know what ivars are? Maybe the code could change faster than the comment because someone forgets changing the comment. Generally it is not a good idea to describe your implementation in Javadoc comments and why should overrides call this function? I would rather call the constructor.
|Is it efficient to attach a comment on every function?|