Jump to content
  • Advertisement
Sign in to follow this  
asdqwe

give up learning C++?

This topic is 3618 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

I just saw on this very forum: "There is no way you could have mastered C++. C maybe but C++ is not even fully defined yet so it's impossible." Maybe I should wait till C++ is complete before learning - why have to learn some parts of C++ for nothing? What is your advice?

Share this post


Link to post
Share on other sites
Advertisement
Learn it. You don't have to be a "master" of a language to produce useful things from it. Start with simple programs and grow to bigger ones, increasing your knowledge of the language as you go. You can do a *lot* with even a subset of C++.

Share this post


Link to post
Share on other sites
If you stop learning something every time someone tells you to, you wont master any language. [smile]

C++ has some areas of it that are undefined, but not in the way you think, and not in the way the person who told you that thinks. (And how could he? He doesn't use C++, so he's not a good source of C++ related information)

The areas of C++ that are undefined, are the things that happen when you use C++ in weird ways that you aren't supposed to. If you use C++ normally, you'll come undefined things rarely, and when you do, it's easy to look up how to do things the right way, and avoid the undefined places.

By 'undefined', I don't mean that C++ has features in the language that say, 'Sorry, we haven't implemented this yet, check back later!'. That'd just be stupid. [grin]

C++ is complete. It's still being upgraded, as are other languages, but it is complete. Some parts are undefined, but that doesn't mean they aren't completed, that just means that you aren't supposed to do that.

If you have already started learning C++, definitely don't give up and switch languages.

But if you haven't started learning C++, then definitely consider learning something else. Not because C++ isn't 'complete', but because it's a difficult thing to learn, and there are easier languages.

If you feel comfortable with C++, press onward! If C++ seems confusing, but you are able to understand it bit by bit, stay with it! If you haven't started learning C++, or only played with it for less than a week or two, go check out Python, it'd be much easier on you.

But by all means, don't listen to anyone trying to convince you to switch languages without giving any good reason why; and even then, don't take what they say and unthinkingly apply it to your particular situation, because your situation isn't their situation, and they don't know what's best in your case.

Share this post


Link to post
Share on other sites
The language is constantly evolving, but the same is true of all languages.

If you had somehow "mastered" the original 1998 standard, everything you learned would still be applicable today.


The post you are quoting was talking about the next version of C++, which will be finalized this year or next. The changes in the C++0x standard are very minor adjustments and the additions of some useful functionality. The standards committee is extremely cautious about changes that could break old code.



Refer to the forum's FAQ for a list of good C++ books, starting with Accelerated C++. Alternatively, you could go look at other languages that have a faster learning curve to cut your teeth on.

Share this post


Link to post
Share on other sites
Will you give up about trying to drive a car because you can have an accident? Sure, the way you seems to look at it, you don't WANT to learn C++, and if you don't have any dedication you will never succeed.

Share this post


Link to post
Share on other sites
@ Servant of the Lord: Thanks for the advice.
1)'Sorry, we haven't implemented this yet, check back later!'- that was exactly what I was afraid of :)
2)"go check out Python"- sorry, I've put much time and patience in C++. And I really need all the horsepower eg. necessary to fuel games like Doom 3 or FEAR. If someone can assure me Python can handle that kind of task (rendering speed mostly) without compromises, I'll be more than happy to learn it. But otherwise, no- I really need the premium package.

Share this post


Link to post
Share on other sites
Quote:
Original post by asdqwe
2)"go check out Python"- sorry, I've put much time and patience in C++. And I really need all the horsepower eg. necessary to fuel games like Doom 3 or FEAR. If someone can assure me Python can handle that kind of task (rendering speed mostly) without compromises, I'll be more than happy to learn it. But otherwise, no- I really need the premium package.

Doom3 and Fear are simply massive projects. By the time you are competent enough to handle them, you will (or should) already know a number of programming languages.

That aside, if you already have made an investment in C++ - see it out to the bitter end. Better to finish learning any language than have a number of half learned ones. Whether one can really finish learning C++ is outside the scope of this reply [grin]

Share this post


Link to post
Share on other sites
If you wonder what this undefined behavior looks like, here's an example:

int i = function1() + function2();

You can compile and run that code, but the C++ standard does not define the order in which the functions are called. Maybe function1 first and the function2, maybe the other way around. If your program depends on the order, this is a bug. If it doesn't, all is fine.

Share this post


Link to post
Share on other sites
That's not undefined behavior; with undefined behavior anything can happen. With that code sample there are only two possibilities: either function1() will be called first or function2() will be called first.

Share this post


Link to post
Share on other sites
Thanks for the correction. I have been away from C++ and fiddling with assembly for too long ;)

So "The order of evaluation of arguments is undefined" really isn't undefined behavior?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!