+ 4
If comments are not to be executed then what is their importance
5 ответов
+ 13
As documentation for the coders
+ 9
It's useless for program itself.
It's code comments for you or others to read in case they want to understand the code.
+ 8
when you back to edit code you will not understand the code again. :)
+ 8
Imagine a big project where over a dozen people work together on a piece of software for several months. You are going to have thousands of lines of code and probably no one who knows every single one of them. Chances are you already forgot how the code works that you wrote 2 months ago.
With comments you can explain the how and what, which is essential for debugging, maintenance or just to enable the other people to use your code. And writing these explanations directly into the cod often is very convenient.
+ 1
Improve readability and understanding