Wow such hatred towards C++

Started by
21 comments, last by Sneftel 14 years, 4 months ago
What do you guys think about his comment : Linus I ask because you guys are more knowledgeable(i.e more experienced).
Edge cases will show your design flaws in your code!
Visit my site
Visit my FaceBook
Visit my github
Advertisement
Please look up Linus on Gamedev.net and sse that this post has been discussed a lot already.
We've discussed that, or at least Mr. Torvald's dislike of C++, before somewhere on this website. Ah, here it is. I suggest you and anyone else reads that before we create huge discussion.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

Its not the first time Linus displays he's anti-social qualities.
He's probably fed up with suggestions about C++, hehe

Even though the thread seems to be about Git, they soon start talking about how C++ is useless for low level OS programming (See a couple of replies later)

I didn't read the whole thing, but it appears that there was already some kind of heated confrontation, and perhaps the spirit with which he bashed C++ was used as a way to get someone angry/upset.
He likes to go an throw all his toys out of his cot every now and then.
That's his loss.
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms
Hmm, attacks on C++ have come from the other side, too - no encapsulation, no modules, no reflection et al. Linus seems to touch on something along these lines further down, too.

It's definitely an eyesore of a language in some several ways. I tend to think of it as a bit of the programmers' kitchen sink, a general wastebucket of 40 or so years of programming legacy - within which are plenty of powerful and quirky constructs with which you can flesh out your designs and generally experiment, but it attracts bugs, and makes bad habits and obfuscated idioms very easy to form.

Anyway, I think C++ is straddling a divide which is about to become a lot more pronounced in the next few years. It will probably eventually fall completely within the systems stream where Straustrup sees it, even if Torvalds is less-than-accepting of it - I seriously don't see C++ holding its own in application programming when apps are just about set to cut themselves loose of the iron entirely.

EDIT: I should say that I don't agree with Linus's idea of what a systems language is, in general, but then again I've always found the GNU/Linux scene's insistence that C is the only choice a bit obtuse.
Also, I find myself becoming more of a fan of Walter Bright.
I'm not a programmer, but all I can see is C++ a f*cking hard language, and people should not learn it as a first language (or second), because it leads to tons of programmers, who can't solve an easy, or even trivial programming task, because they are sweating with classes/whatever, instead of the real problem, which could be solved with a humble global variable which isn't included in any classes for example.
We can see a lot of threads about these 'problems' here on Gamedev too.

C is a lot easier and straightforward.

But if someone's a professional in C++, C++ is better than C.

But that's only my humble opinion.
Quote:Original post by szecs
because they are sweating with classes/whatever, instead of the real problem, which could be solved with a humble global variable which isn't included in any classes for example.

The problems of the C++ language are not classes (a concept included in quite any modern language). In addition, global variables are there available if you want to use them, but are most often the bad answer to the problem. Other languages (i.e. Java or C#) don't allow G.V :-)

Quote:
C is a lot easier and straightforward.


You can use C++ just as you used C (in fact, often a C program will compile with a C++ compiler). The fact that C++ offer evoluted tools (template metaprogramming, just to name one) does not mean you have to use it :-)

Note that I don't mean to argue, I just want to clarify a couple of sentences.

About the linus statements, that's perhaps why linux is still based on C, just like unix was 30 years ago :-)

Quote:Original post by szecs
I'm not a programmer, but all I can see is C++ a f*cking hard language, and people should not learn it as a first language (or second), because it leads to tons of programmers, who can't solve an easy, or even trivial programming task, because they are sweating with classes/whatever, instead of the real problem, which could be solved with a humble global variable which isn't included in any classes for example.
We can see a lot of threads about these 'problems' here on Gamedev too.

C is a lot easier and straightforward.

But if someone's a professional in C++, C++ is better than C.

But that's only my humble opinion.
OK, sorry, a million people have said this a million times already. (I posted before reading the other threads.)

This topic is closed to new replies.

Advertisement