Comment on Documentation is for computers to read (or: Commenting Code is Evil)parentComments−michael_dorfman17ySorry, 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.
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.