Slashdot Mirror


Linus Torvalds In Sweary Rant About Punctuation In Kernel Comments (theregister.co.uk)

An anonymous reader shares a report on The Register: 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."Torvalds despises the following two comment-punctuation styles (with his comments):/* This is disgusting drug-induced
* crap, and should die
*/
and:/* This is also very nasty
* and visually unbalanced */
Torvalds prefers the following two styles:/* This is a comment */ and:/*
* This is also a comment, but it can now be cleanly
* split over multiple lines
*/

9 of 523 comments (clear)

  1. Whether he's overall crazy or not... by Anonymous Coward · · Score: 5, Insightful

    ...I happen to agree with his stance on this particular issue.

    1. Re:Whether he's overall crazy or not... by RabidReindeer · · Score: 4, Insightful

      If nasty-looking comments were the worst offense in recent Linux releases, I'd be overjoyed.

  2. Re:Arguing over the subjective by tripleevenfall · · Score: 5, Insightful

    I'd remind him from the real world that he should be glad there are comments at all.

  3. please just go all the way to the C++ mode by vux984 · · Score: 5, Insightful

    Seeing as 'C++ mode' // comments were added to the C99 spec; this would be my preference. I've always hated all forms of /* */

  4. Re:Arguing over the subjective by alvinrod · · Score: 4, Insightful

    Not the OP, but I don't particularly care about it in this instance (though I've got my own pet peeves in plenty of other cases), but when you work for a company or contribute to a project, you should follow their style conventions.

  5. Linus is right by jgotts · · Score: 5, Insightful

    Linus is right. I've been using the Linux kernel coding style as much as possible in all of my programming, regardless of the language, since around 1994. I get nothing but compliments.

    When it comes to the kernel, the most important thing is writing code that other people can read and modify. Anybody can write new code. It takes an artist to write code that other people can easily understand.

  6. Re: Arguing over the subjective by Kjella · · Score: 5, Insightful

    Linus got an abundance of coders and by far most are paid, you can't compare it to other projects where you're lucky to get volunters at all. The kernel runs everything from cell phones to supercomputers and the markets it doesn't dominate is not the kernel's fault. He can well afford to only take high quality code that follows the style guides. Linux is simply not like most projects.

    --
    Live today, because you never know what tomorrow brings
  7. Re:Arguing over the subjective by TemporalBeing · · Score: 4, Insightful

    I'd remind him from the real world that he should be glad there are comments at all.

    Since for anything to get merged it must pass by Linus, he can insist that you put comments on it or it does not get merged.

    The Kernel source actually has quite a few comments, and some very funny jokes running throughout it.

    So when dealing with a BDL or core maintainers for a project, you just do what they say as if they were your employer paying you - as any professional would do; or you go do something else.

    --
    Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
  8. Re:I don't use comments by swillden · · Score: 5, Insightful

    I like to make people work harder to figure out what I did.

    I used to get a chuckle out of doing that... but then I figured out that the guy working hard to understand my code later is almost always me. I strive to write clean, clear code with useful comments to avoid making myself work harder to figure out what I did. Sometimes it even works.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.