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
*/

4 of 523 comments (clear)

  1. Re:please just go all the way to the C++ mode by tlhIngan · · Score: 5, Informative

    Am I the only one who wishes languages had different semantics for disabling code versus actual comments? Sometimes it's nice to have, plus it helps avoid the issue of having a block of code with a /* */ comment in it, then putting another /* */ around that block of code to disable it, only to find out that the first */ closed the outer comment.

    C does this quite well.

    Use

    //

    and

    /* */

    for textual comments.

    Use

    #if 0
    ....
    #endif

    for code comments.

    Bonus is many editors recognize the #If 0 idiom and automatically block-comment the code out!

    And the preprocessor is self-balancing, so every #if must have a corresponding #endif making it ideal for commenting out blocks of code.

  2. Re:Arguing over the subjective by Ann+O'Nymous-Coward · · Score: 4, Informative

    I am so sick of that tired old pile of steaming crap. Just don't. It stopped being funny decades ago.

    Real programmers know that other programmers will have to support their code.

    Obey Wheaton's Law: Don't Be A Dick.

  3. Re:Arguing over the subjective by Dutch+Gun · · Score: 4, Informative

    C++ absolutely solves the "goto fail" issue. The term that describes this is RAII. C++ uses objects and smart pointers (which are just pointers wrapped in objects) to hold resources. When objects go out of scope, those resources are automatically destroyed. There's very little need to clean anything up manually with modern C++.

    --
    Irony: Agile development has too much intertia to be abandoned now.
  4. Re:It's got to be said. by phantomfive · · Score: 4, Informative

    He has influence over comments. He doesn't have influence over systemd.

    --
    "First they came for the slanderers and i said nothing."