Sign in to follow this  

First language

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

Well whats the best language to learn first if you want to program games(between c and C++)..especially if you want to learn the second one at least somewhat later. Me and some others have been argueing about wich is best to begin with..or just to stick with one, so any help would be nice,thnx.

Share this post


Link to post
Share on other sites
Between C and C++? C++, although C is still used, C++ is much more common now, and is similar to newer languages you may want to learn as many of them used C++ or similar languages as a starting point (for example Java & C# are fairly easy to learn if you ever want to)

Share this post


Link to post
Share on other sites
I guess it really depends on wich language you _want_ to like.

It seems weird but all ppl that i know that learned c before c++, prefer c, the ones that learned c++ first prefer c++.

I guess that when you get used to the simplicity of c, you get to c++ and it seems to cluttered, too many classes, templates, then there is the argument over the performance.
When you start with the easiness of c++, everything in c seems to be the reinvention of the whell, you have to make this and that, when you had a class for it in c++.

If you start with one, i'm guessing you'll preffer it over the other =). So just chose the one that's going to benifit you more. Probably c++(this from a c/asm die hard ^_^).

Share this post


Link to post
Share on other sites
I'm assuming that you are asking which is better as a /first/ language. Learning a new language isn't that hard. The difficult thing is learning how you need to think.

This is why learning something like SML or Haskell (functional programming) after C or Pascal (structured programming) say, is much harder - nearly on the level of learning to program again.

Switching between C and Pascal is reasonably easy. Main difficulty is remembering how you create an array or a pointer - syntactic stuff.

C++ is a much more complicated language. Out of the two, if you are just starting I'd consider C first, note however, it can be wrong to see C++ as a superset of C (you can cause problems for yourself thinking like this).

If you've never programmed before I'd suggest learning something else like Python first, it'll teach you some of the basics, you can write games (even 3D games) with it - it's even the scripting language for the rather excellent modeller, animator and game engine Blender.

Learning C or C++ first off could potentially be a rather challenging experience. Languages like Java tend to build off C rather than C++ - though they tend to have many of the features of C++, the implementation is very different.

Share this post


Link to post
Share on other sites
Quote:
Original post by White Rabbit
then there is the argument over the performance.


Which is completely redundant statement because you could end up emulating things inefficiently in c that is already built-in to C++ and part of the standard library.

Quote:
Original post by LucidIon
Out of the two, if you are just starting I'd consider C first


There are those who would argue that it's other way around because of the low-level nature of C.

The problem with old C++ books they tend to start teaching the low-level aspect of C++ first, such as using C style arrays, C style strings, pointers & dynamic memory.

Where like in some modern books will start off using standard library containers & algorithms, use standard library string type wright at the begining. This allow you to write code on a high level and not have to introduce low-level topics such as pointers & memory management until much much later.

slayton personally if there was ever such a thing then i would have to say it would be Pascal as one of the best learning language as it was created for this purpose but its also been used in real products in the past.

I think if your aiming to learn both C & C++ and C++ becomes your main usages i would suggest you get a good modern book on C++ first if you start with C you will most definately get some habbits which are perfectly fine in C but not in C++ and you won't be able to shake it off that easily.

C++ is no trivial language and it has it's quirks so it would probably take around 2-3 years to really learn it completely. Then i would suggest you get this book on C:

The C Programming Language, Second Edition by by Brian W. Kernighan and Dennis M. Ritchie

It's a bible book for C and it will give you some new insight & appreciation between the two.

Share this post


Link to post
Share on other sites

This topic is 4862 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this