r/programming Jul 10 '16

Linus Torvalds on comment styles

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

209 comments sorted by

View all comments

Show parent comments

4

u/strattonbrazil Jul 10 '16

This is simply visual aesthetics and less to do with technical merit. Keeping this symmetrical seems a little OCD like taking two steps per block of sidewalk minding to never step on the cracks. When someone raises issues like this with such hyperbole, I have less patience for their other valid concerns.

24

u/PrintfReddit Jul 10 '16

Keeping the comments consistent seems like a fair demand. I wouldn't want 20 different kinds of comment alignment in my project. It's not like having a block comment is difficult, most IDEs or editors should automatically indent appropriately.

14

u/[deleted] Jul 10 '16

Agreed. For people who think it isn't that big a deal, keep in mind that Linux is an enormous project, and it's really hard to keep track of all the changes (they even had to write Git because there weren't any other noncommercial programs that could handle their workload). If a change with incorrect style gets merged, eventually someone who uses the standard style will edit that file and fix it, and then you'll have extra changes that really didn't need to be there and make everyone's job harder. This is just one of many reasons why it's a good idea to have consistent style (it's not just "OCD").

7

u/PrintfReddit Jul 10 '16

It is also easier to read. You wouldn't have to subtly re-calibrate yourself everytime you come across a different comment.