Linus Torvalds in expletive-ridden rant over comment syntax

Torvalds tipped over the edge by 'brain-damaged stupid' comments style

Linux creator Linus Torvalds has gone on another epic, expletive-filled rant intended to bring the kernel developer community into line over comment syntax styles.

Torvalds, chief maintainer of the Linux kernel, has a fine record of no-nonsense posts to the army of coders who keep the operating system going. And the comments are a key means by which developers follow and understand code across the community.

Torvalds was writing in response to a proposal to standardise on a syntax style used to add comments which he described as "brain-damaged stupid".

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

"In other words, these three models are good:

(a)
/* This is a comment *./

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

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

and they are all obviously visually balanced."

Torvalds was writing in an attempt to persuade Linux kernel developers to adopt clear and easy-to-absorb comments in their code.

"Note how all the above comment styles have a certain visual symmetry and balance. But no, the networking code picked none of the above sane formats," he wrote. Instead, he added, it picked two models "that are just half-arsed shit-for-brains".

The networking chaps, he wrote, had chosen a "really horribly disgusting" commenting style, and added: "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.

"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 suggested that developers across the whole of the Linux kernel ought to shift to the C++ style of commenting and be done with it, fixing up the "mess" left behind by prior styles as code is updated.

So, the Torvalds has spoken. Fall into line.

Computing spoke to Linus Torvalds in an interview in 2012 after he picked up the Millennium Technology Prize. It covered everything from the Vic-20 to the Raspberry Pi, and with no swearing.