4 ms·
"A good alternative to a car with seat belts is a car without seat belts that is nevertheless equally safe." There's lots of important information that comment
by bccdee 3y ago
"A good alternative to a car with seat belts is a car without seat belts that is nevertheless equally safe."
There's lots of important information that comments can convey which code itself cannot. In particular, a program's code can tell you how it works but not why it was designed to work that way.
And after a point, even trying to convey too much information about how a program works through code can be cumbersome. We've all seen function names that are way too long, because the author wanted to cram way too much information into it. That extra information should have been put into a comment, where the author could have articulated it clearly, instead of as a single overlong compound verb in camel case.