logoalt Hacker News

lintfordpickletoday at 7:40 AM1 replyview on HN

I disagree with the overall sentiment of this article. I wouldn't say comments are never useful, because they certainly can be. But once verbose commenting becomes the norm, people (and now especially LLMs) will overuse them, making the code unnecessarily obtuse and difficult to read. And the point about maintenance is real.

There are also a couple of 'pointless' statements in the article itself:

> "Use a combination of in-line and standalone comments, depending on the situation"

isn't that just every kind of comment?


Replies

boxesnlinestoday at 8:22 AM

(I am the author)

The point of that statement was to run counter to the standards of "always us X type of comments" that some teams adopt. My suggestion is that there isn't a "correct" type of comment that you should always use, but rather that it's highly situational.

It's really a parallel to grammar in any other kind of language - there isn't a singular 'correct' way to structure a piece of writing into paragraphs, but it's also typically incorrect to treat each sentence as a paragraph or to avoid paragraphs entirely and write everything as a single block of text.

It's unthinkable that a team of writers would ever try to standardise on "never use paragraphs" or "every line is a paragraph", but some programming teams do exactly the equivalent of that!

show 1 reply