+ 1
Why is comment actually made if it is ignored by the compiler ??
2 Réponses
+ 5
Imagine you're in a forest... When using a physical map(A paper one) noting the distance covered, leaving trails and making markings on the map is useful.
Your code is the forest your markings, trails etc are the comments.
In future it's easy to navigate the forest
THAT'S HOW USEFUL COMMENTS ARE.
+ 2
If you're asking why a programmer would want to make comments even though the compiler ignores them, it's because they help document the code. If someone else came along and saw your code, or even if you revisited a code you wrote a year ago, it's helpful to have those comments explaining how it works