Skip to main content
GameDev.net gamedev.net
🔒 Locked

Java Vs C++ for learning.

Started by KyleM Dec 11, 2010 at 2:41 PM 7 replies 1.1k views
Original Post
KyleM
KyleM
Well, currently I am learning C++, been doing it for a while, I am just about to learn inheritance. I plan to develop small games and work my way up, when java started to intrigue me.

Should I stop learning C++ and start with java, or should I continue with C++ now that I am this far.
blubberbert
blubberbert
why would you choose java over c++? i know a little java and am quite experienced with c++ and i think c++ is quite as easy/difficult as java. c++ also means more performance (i heard of people getting 300ms delays on android devices when the garbage collector decides to strike)

what makes you think that java would be better for your needs? i dont know very much about java tbh, but i think its not very good for games (may be possible tho)

anyway when programming games i found myself spending much more time on learning APIs such as OpenGL wich exist for both Java and C++ than learning the C++ language
------------------------------
Join the revolution and get a free donut!
Washu
Washu
You should really read the FAQ as it has almost this exact question in it.

In general, avoid C++ as a first language. You should prefer a simpler language with a much easier syntax in order to learn the art of PROGRAMMING. Said art will transfer between languages, and so picking up C++ at a later point will be just a matter of picking up the language syntax and getting around the numerous little foibles the language has.

You can use Java with JOGL, or C# with XNA/SlimDX... you can use Python with PyGL or PyGame. This is also covered here.

[google] will help too. We get this question asked A LOT, and usually the answer is the same.
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
blubberbert
blubberbert
i started with c++, its not too bad ;)
------------------------------
Join the revolution and get a free donut!
KyleM
KyleM
Sorry about this seeming like a common question, as I have seen it asked quite a lot. It's just I am pretty deep into C++ right now, and wonder if switching languages is a good or bad idea and if it's beneficial.
KyleM
KyleM
As I have said, I have really been doing this for quite a while, so I haven't really got the choice in what I chose to learn first, I have already begun. I had no prior programming experience at all when I started C++, struggled, but eventually got used to it, it's been going OK lately, but sometimes I think switching to java would make it easier on myself, and also the fact that my university seems to teach Java a lot kind of entices me as well.
Washu
Washu
Define "quite a while." If it's under a few months, I would suggest switching to another language.

If you've been working at it for six or more months, and are still struggling, then perhaps you should switch as well.

C++ is NOT a trivial language, and most people who think they know it DON'T (a point my quizzes drive home).

If your university teaches it, then perhaps you should switch. Remember, this field is about programming, not programming languages. The languages are just the syntax you use to get the machine to do what you want, programming is the art of solving problems, not some language.
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
KyleM
KyleM
Been doing it for almost a year now, not that I am struggling really, I just wanted to know if switching so far into another language would make things hard for me.

Guess I will switch to java then and learn some of that.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.