+ 4

If comments are not to be executed then what is their importance

13th May 2017, 3:05 AM
Jay
Jay - avatar
5 Answers
+ 13
As documentation for the coders
13th May 2017, 3:12 AM
NimWing Yuan
NimWing Yuan - avatar
+ 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.
13th May 2017, 3:09 AM
CalviŐ˛
CalviŐ˛ - avatar
+ 8
when you back to edit code you will not understand the code again. :)
13th May 2017, 3:21 AM
Nithiwat
Nithiwat - avatar
+ 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.
13th May 2017, 4:15 AM
Tob
Tob - avatar
+ 1
Improve readability and understanding
13th May 2017, 12:00 PM
arnaud
arnaud - avatar