Change request #1054

Remove superfluous comments

Added by Deil Christoph over 10 years ago. Updated over 10 years ago.

Status:RejectedStart date:01/04/2014
Priority:NormalDue date:
Assigned To:-% Done:

0%

Category:-
Target version:-
Duration:

Description

GammaLib has thousands of comments like this:

    // Free table
    delete table;

    // Return
    return;

I suggest to remove those, following the advice of Bjarne Stroustrup who writes in Section 9.7 of his book on C++ (http://www.stroustrup.com/4th.html):

“Once something has been stated clearly in the language, it should not be mentioned a second time in a comment.”

Jürgen, as in #1053 I’m happy to make a pull request for you to review, but I wanted to ask first if you agree before going through and removing those lines.
As in the change proposed in #1053, the advantage is that 1000s of superfluous lines are removed from the GammaLib code files and don’t have to be read by future developers / users.


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 10 years ago

This is also a question of taste. When you read Donald Knuth (http://en.wikipedia.org/wiki/Literate_programming) you would even add more of that ...

Comments also help to structure the code (at least if your editor is highlighting the code). I agree that some comments are not very informative, but then the action should be rather to make the comments more informative and not to remove them.

#2 Updated by Deil Christoph over 10 years ago

// But
but

// why
why

// repeat
repeat

// the
the

// exact thing
exact thing

// twice ?
twice ?

:-)

#3 Updated by Deil Christoph over 10 years ago

It’s just a suggestion ... feel free to reject and close.

#4 Updated by Knödlseder Jürgen over 10 years ago

  • Status changed from New to Rejected

... I take the freedom ;)

Also available in: Atom PDF