Search code examples
coding-style

Formatting block comments


The first style of formatting seems to be much more popular than the second. Why is that?


The first (asterisk on every line)

/*
 * line 1
 * line 2
 * line 3
 */

The second (the minimum amount of asterisks)

/*
line 1
line 2
line 3
*/

Solution

  • Probably because it is more readable, in case the comment has a lot of rows you know you are reading a comment even if you do not see the end.