2018-02-09 8:10 GMT-03:00 Sven Van Caekenberghe <s...@stfx.eu>:
> name
>   "Returns the receiver's name"
>   ^ name
>
> Would also pass a simple test, while it is quite useless.
>
> I would say that any public, non-trivial methods need a comment.

Commenting an accesor is redundant, IMO.

And rename refactorings usually don't rename the comments (hopefully).

However I think that having a public guideline on how to comment
methods would be positive for the community (if these rules are
consensual).
After that some tools can use these guidelines to generate comments on
their own, or if you don't know how to comment, simply copy the
templates from the guide.

E.g. Private methods in Dolphin always start with "Private - ...", if
you remove the "private" category from the method (methods can belong
to multiple categories), then it removes the "Private - " prefix from
the comment as well.

Regards,

--
Esteban.

Reply via email to