Skip to content

Comment on Documentation is for computers to read (or: Commenting Code is Evil)

Comments

I disagree. I think comments are often overused but I'm not convinced that code and tests are expressive enough to always convey why functionality exists.

For example, sometimes limitations in third party dependencies force you into adding additional code that might look out of place or redundant. In cases like this it can be hard to capture why this code was introduced without using a comment.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.