Skip to content

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

Comments

Sorry, but I don't buy the whole "if it's so complex that you need to leave a comment - you're doing it wrong."

Take, as a counter-example, any of Knuth's literate programs. Do you really want to say he's doing it wrong?

Some things are that complex. And sometimes, the best way to make sure that the code is understandable is to add some human-readable text.

It's naive to think that humans and compilers should both be able to parse and comprehend the same text with the same ease.

AboutSource Built by g1lg1l

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