Software

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

213 SHARE

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:

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

(no-no-no)
/* 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

213 Comments

More from The Register

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

Red Hat Enterprise and CentOS users at risk

Dormant Linux kernel vulnerability finally slayed

Just, er, eight years later

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

Russia's national vulnerability database is a bit like the Soviet Union – sparse and slow

By design, though, not... er, general rubbishness

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

Tweak VFAT volume to execute arbitrary code

One-in-two JavaScript project audits by NPM tools sniff out at least one vulnerability...

...and those devs are then applying patches, we hope