Reply to post: re: For block comments

Linus Torvalds in sweary rant about punctuation in kernel comments


re: For block comments

In my view block comments of code need to have a marker at the start of each line so that when they appear without context, eg via grep or other search tools, it is still obvious it is a comment. That marker can be as asterix, I guess, but I just use // for all comments. My text edit makes it easy.

I also let the text editor wrap long lines, so I only need one // per paragraph, making it easy to edit. Using hard line breaks is a bad idea when you are editing in a window that might not be exactly 80 columns wide.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019