7 ms·
I think the "code should be self-documenting" view is a bit simplistic. Good comments shouldn't explain what the code is doing, I agree that should be evident
by agubelu 3y ago
I think the "code should be self-documenting" view is a bit simplistic.
Good comments shouldn't explain what the code is doing, I agree that should be evident from the code itself if it's clear enough. However, why the code is doing what it's doing, or why it's being done in a certain way and not in a different way, is meta-information that is very hard to express in the code itself, and that's where comments are most useful.