Jump to content
  • Advertisement
Sign in to follow this  
Concentrate

Wow such hatred towards C++

This topic is 3264 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Please look up Linus on Gamedev.net and sse that this post has been discussed a lot already.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 :-)

Share this post


Link to post
Share on other sites
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.)

Share this post


Link to post
Share on other sites

This topic is 3264 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!