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


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

Apache Hadoop spins cracking code injection vulnerability YARN

Loose .zips sink chips 2: Electric Boogaloo

Dormant Linux kernel vulnerability finally slayed

Just, er, eight years later

Linux kernel 'give me root, now' security hole sighted, dubbed 'Mutagen Astronomy'

Red Hat Enterprise and CentOS users at risk

Uber's revolting sexism, the movie

Susan Fowler's story pitched as 'Erin Brockovich meets The Social Network'

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

Best git patching y'all

SoftNAS no longer a soft touch for hackers (for now)... Remote-hijacking vulnerability patched

Your files are someone else's files, too, thanks to storage bug

Docker fave Alpine Linux suffers bug miscreants can exploit to poison containers

Now that's poetic, Justicz: Update apk and images now

OpenFlow protocol has a switch authentication vulnerability

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

Batten down the ports: Linux networking bug SegmentSmack could remotely crash systems

Patches incoming for kernel versions 4.9 and up

VMware preps NSX network virtualization for smaller customers

Q1 2019 beats expectations, full-year guidance raised