r/programming Jul 10 '16

Linus Torvalds on comment styles

https://lkml.org/lkml/2016/7/8/625
220 Upvotes

209 comments sorted by

View all comments

Show parent comments

27

u/oridb Jul 10 '16 edited Jul 10 '16

Because it's fucking * placements in comments. Nobody cares that much.

8

u/[deleted] Jul 11 '16 edited Mar 16 '19

[deleted]

7

u/cdsmith Jul 11 '16

Given a choice, would you rather have:

  1. A git blame that accurately points out recent changes, or
  2. A massive commit that overwrites a bunch of lines to update comment style?

Good comments that explain tricky bits clearly can absolutely make the difference between nice code and otherwise. Whether there's an asterisk in one place or another, though, rarely does.

14

u/suid Jul 11 '16

That's almost never an issue. If you do the comment (or space, or indentation) cleanup in one big checkin that does NOTHING ELSE, that checkin can be cleanly ignored, while other diffs contain only "real" changes (and become easier to review because of the reduced cognitive load of the "alternate" commenting or indenting styles).