Linus: C++ is a horrible language
article.gmane.org
article.gmane.org
Linus is just having a strong reaction, the rant is more than four years old, Linus says nothing interesting about C++ and the same could be said about so many languages that its sad.
Additionally, any post about "this language is teh suxxance" - even when written by someone worth of attention - is generally full of nothing and adds little value to a community.
Thanks for pointing out the ambiguity, though. I'll try and fix that (that won't be easy, "mutable" definitely is the best keyword for what I want to express).
(Yes, I wrote that article, and I am dead serious. This is also not a random rant. I wrote other articles to back that up: http://www.loup-vaillant.fr/articles/ Note that I don't attack any particular language here, but an entire class of them.)
Usual rant from a newbie C++ developer.
The guy did marvelous things; his opinions about languages are not his expertise, and not worth wide discussion.
If I understand correctly, Linus is saying something I agree with: a bad programmer using C++ will write code that is harder to maintain than code written by a bad programmer using C.
Bjarne Stroustrup once said, "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off."
In his FAQ, he expands on this point: "What people tend to miss, is that what I said there about C++ is to a varying extent true for all powerful languages. As you protect people from simple dangers, they get themselves into new and less obvious problems. Someone who avoids the simple problems may simply be heading for a not-so-simple one. One problem with very supporting and protective environments is that the hard problems may be discovered too late or be too hard to remedy once discovered. Also, a rare problem is harder to find than a frequent one because you don't suspect it."
In my view, Linus is agreeing with BS.
You can write horribly structured code in C, probably more easily than in C++. And some people do. But most C programmers read K&R at some point, or maybe even some Linux kernel code, and so they end up valuing a style that emphasizes clarity and simplicity.
If anything, the sheer easiness of shooting yourself with C puts on a Darwinian pressure that causes long-term C developers to either adopt this culture or switch to something else.
At the very least Dmitry can now add to his resume that he is full of BS as per Linus Torvalds. I would've loved to have that on my resume if I were applying for the C jobs :)
That's the key restriction from Linus right there. He was talking about system-level code.
For everything else (application-level, frameworks, etc.), you need the abstractions that C++ provides.
Linus is widely considered to be a nice guy, and he probably is. But make sure you've toughened your skin before posting to linux-kernel.