Written by  on July 13, 2016 

One of my heroes (Linus Torvalds) published some days ago some rant about the “correct” style of comments.
Honestly, I agree 100%! And from my POV his version c is my preferred one: for single lines and blocks of comments.

// This can be a single line. Or many. Your choice.

Had some severe discussions about this topic in past dev-teams while negotiation some “best practices/style-guide”.

* you can quickly comment/uncomment sections of code without worrying where the “begin” and where the “end” is
* if you used /* .. */ then “uncommenting” could result in commenting something else, because of nested comment-parts
* only drawback: comments last until the end of the line

Category : 0xDEADBEEFC++

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.