comments confused? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

comments confused?

if comments aren't executed what's the use of them

22nd Jul 2016, 6:31 AM
Dragon-codex
Dragon-codex - avatar
2 Answers
+ 3
it's not for using in code. it's for debugging. in most open-source projects, you can edit someone else's work or reuse it. those comments are for your eyes. try to write comments for other people's eyes too there's also a good use for those. you'd only feel how valuable it is when you try to edit a code you wrote 4 years ago... that's when you definitely will appreciate the comments you left for your self last but not least, you might have a code that you wanna dismiss for now but you don't wanna delete (we always do that, and want it to stay for reference or for later edits). easiest way is to comment it
22nd Jul 2016, 2:49 PM
Dr.Na'el Hariri
Dr.Na'el Hariri - avatar
0
comments are like notes / information which you (a developer) might need for himself and would not want the viewer of the page to know about it.
13th Aug 2016, 8:06 PM
tariq