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
*/
* 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
*/
At least in all my professional software development, this kind of nitpicking is par for the course. The difference is that in a corporation you can strong-arm your team, either because they report to you or because you have political clout. In free software with something that has thousands or more of contributors, all you have is screaming loudly and offensively enough to get on slashdot. Then maybe people figure out that this is how they want it done.
Someone could scream back with valid arguments about why: /* This is a good idea,
* we should do this! */
I can't think of one. All I can think of is "who cares", the answer to which is "Linus" (and others), and if I don't care I should just do it their way.
I use // for comments, and /* for disabling block of code.
C does this quite well.
Use
and
for textual comments.
Use
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.
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.
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.
He has influence over comments. He doesn't have influence over systemd.
"First they came for the slanderers and i said nothing."
If you need to use < or > in your slashdot comments, you need to type < and > since slashdot interprets the < or > as marking HTML tags. If you have Notepad++, use TextFX Convert -> Encode HTML to automatically convert code samples, e.g.:
#include <iostream>
#include <fstream>
using namespace std;
int main () {
ofstream myfile;
myfile.open ("example.txt");
myfile << "Writing this to a file.\n";
myfile.close();
return 0;
}
my, your, his/her/its, our, your, their
I'm, you're, he's/she's/it's, we're, you're, they're