Short Bytes: Linux Torvalds is again mad over some developers due to their “disturbing” coding style. He has bashed the networking developers by pointing out their “brain-damaged” commenting syntax and listed out the styles that a Linux kernel developer should use.
In a recent addition to this, Linus Torvalds has launched an epic rant–here’s the last rant, in case you forgot–against some Linux kernel developers over their particular commenting style.
Comments are very useful in the programming process as they help fellow programmers understand the code and its working.
Well, it looks like the chief maintainer of Linux kernel didn’t like the preferred method of punctuating comments being followed by some members. Labeling them “brain-damaged”, Linus demands that we should get rid of “stupid networking comment syntax style”.
Advocating the “balanced, symmetric, and traditional C style comments”, Linus Torvalds says that if the networking people can’t handle this style, “then instead of the disgusting unbalanced crap that these guys use now, please just go all the way to the C++ mode.”
Well, here are the commenting style that Torvalds recommends:
/* This is a comment */
* This is also a comment, but it can now be cleanly
* split over multiple lines
// This can be a single line. Or many. Your choice.
He doesn’t like this style but he can be a little tolerant:
/* This is an alternate multi-line format
that isn't horrible, but not kernel style */
In his rant, Linus persuades the Linux kernel developers to use such clear commenting syntax in their code. However, as he says, the networking code doesn’t follow these “sane formats”. Instead, the devs picked the models “that are just half-arsed shit-for-brains”.
Here are the styles that are a big NO!
/* This is disgusting drug-induced
* crap, and should die
/* This is also very nasty
* and visually unbalanced */
He bashes the method of using an asterisk box to write comments. “I’m sure that looks really nice if you are out of your mind on LSD, and have nothing better to do than to worry about the right alignment of the asterisks,” he said.
Well, which comment styles do you use in your code? Tell us in the comments below.