This article is more than 1 year old

Linus Torvalds in sweary rant about punctuation in kernel comments

'Brain-damaged sh!t-for-brains' devs told to drop 'drug-induced crap' and use asterisks properly

Linus Torvalds has unleashed a sweary rant on the Linux Kernel Mailing List, labelling some members “brain-damaged” for their preferred method of punctuating comments.

“Can we please get rid of the brain-damaged stupid networking comment syntax style, PLEASE?” the Linux Lord asked last Friday.

“If the networking people cannot handle the pure awesomeness that is a balanced and symmetric traditional multi-line C style comments, then instead of the disgusting unbalanced crap that you guys use now, please just go all the way to the C++ mode.”

Serious stuff, isn't it!

For the record, Linus reckons the following comment style is good.

/* This is a comment */

He's also happy with this format:

* This is also a comment, but it can now be cleanly
* split over multiple lines

If you must, use the comment format below and you'll avoid Torvalds' ire.

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

For those of you who like to provoke, Torvalds will tolerate this format:

/* This is an alternate multi-line format
that isn't horrible, but not kernel style */

Torvalds writes that “all the above comment styles have a certain visual symmatry [sic] and balance.” Which is what he wants in a comment style.

Sadly, he also writes that “the networking code picked *none* of the above sane formats.”

“Instead, it picked these two models that are just half-arsed shit-for-brains,” which we present here with Torvalds' commentary in parentheses:

/* This is disgusting drug-induced
* crap, and should die

/* This is also very nasty
* and visually unbalanced */

“I'm not even going to start talking about the people who prefer to 'box in' their comments, and line up both ends and have fancy boxes of stars around the whole thing," he adds. "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.”

Torvalds wonders if this kind of comment punctuation mess means it's time “... to start moving the whole kernel over to the C++ style, it's been many many years since we had compatibility issues and we are all used to it by now, even if we weren't all fans originally.”

For now, he writes “I really don't understand why the networking people think that their particularly ugly styles are fine. They are the most visually unbalanced version of _all_ the common comment styles, and have no actual advantages.”

If they'll just stop using asterisks in ways that offend his sensibilities, all our problems will be over. ®

More about


Send us news

Other stories you might like