DEV Community

Discussion on: Is Commenting Code that necessary?

Collapse
 
benibela profile image
Benito van der Zander • Edited

Too many comments are useless. The code should be self-documenting.

For example in one of my projects there was a function void setupToolbar. Recently someone added a comment to it. Now the code reads:

/*!
 * \brief setup Toolbar
 */
void setupToolbar()
Collapse
 
aashrithashiva29 profile image
Aashritha Shiva

yeah !! well said and the example is clear :)
That's why I used the statement "Don't use it everywhere"