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

By Simon Sharwood, APAC Editor


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. ®

Sign up to our NewsletterGet IT in your inbox daily


More from The Register

Git security vulnerability could lead to an attack of the (repo) clones

Best git patching y'all

Dormant Linux kernel vulnerability finally slayed

Just, er, eight years later

OpenFlow protocol has a switch authentication vulnerability

It's old, it's everywhere and it's not likely to be fixed in a hurry

Until last week, you could pwn KDE Linux desktop with a USB stick

Tweak VFAT volume to execute arbitrary code

'Amnesia' IoT botnet feasts on year-old unpatched vulnerability

New variant of 'Tsunami' is a disaster waiting to happen

Sounds painful: Audio code bug lets users, apps get root on Linux

Cisco discusses Advanced Linux Sound Architecture mess before formal CVE release

Amazon adds cloudy Linux desktops to encourage developers to code for EC2

Running Amazon Linux 2, which just scored long-term support

Dirty COW redux: Linux devs patch botched patch for 2016 mess

This time it's a 'Huge Dirty COW' and Linus Torvalds has cleaned up after it

Linux Beep bug joke backfires as branded fix falls short

PCs don't have beepers any more, but code to make' em sound off lets you see files

Patch alert! Easy-to-exploit flaw in Linux kernel rated 'high risk'

Urgent security triage needed