3 ms·
While I mostly agree, breaking out a comment for every parameter tends to wordiness and to encourage you not to see and explain your purpose synoptically. Like,
by abecedarius 15y ago
While I mostly agree, breaking out a comment for every parameter tends to wordiness and to encourage you not to see and explain your purpose synoptically. Like, this:
> Perform an n-fold frobulation.
> @param n the number of times to frobulate
> @param x the x-coordinate of the center of frobulation
> @param y the y-coordinate of the center of frobulation
> @param z the z-coordinate of the center of frobulation
could be "Frobulate n times around the center (x,y,z)." (From http://stackoverflow.com/questions/499890/what-is-your-personal-approach-take-on-commenting/500268#500268 http://stackoverflow.com/questions/499890/what-is-your-perso... )
So the example would go "Return text concatenated count times." I'd try rewriting the longer example from a diff message in the OP, except it didn't fit in its own snippet!
A wordy style makes writing and maintaining comments feel like a chore; feeling like a chore, it gets done less. People start finding reasons comments are bad, and taking them for the whole story.