Which language is better to learn? C++ or Java?

Aye, we are getting stuck again. I am still an advocate of c++, for some of the aforementioned reasons, and its heritage to C. Basically, by learning c++ you learn 2 languages at once.

The only area in which java is really superior to c++ is the GUI features, which are built in, yet not as simple to use as Cocoa. So, if you plan to stay on the Mac mostly, I suggest learn C, then C++ and Cocoa, for the last 2 it doesn't matter which order, just not at once. You would still be able to program for other platforms with C++ if you find yourself a suitable GUI framework.

I learned C++ way before ObjC, and for me the new syntax and concepts introduced with ObjC were mostly very easy to grasp, but I doubt it is the same the other way around. I guess this is because ObjC is more lazy than C++. HTH,

OK, I was just joking about the pointers. I'm going to finish learning C before I venture into anything else, so I'm going to learn pointers eventually. I just said that because I know pointers are the hardest part of C. BTW Carlos, I'm looking to make shareware games, so the moderator can feel free to change it to "Which language is better to learn for making shareware games: C++ or Java?" Thanks.

P.S.-
I think it is important to note that right now, I'm just looking to create simple shareware games, not the next Halo.

From my experience with Java (which hasn't been good at all), find a very good book and learn from a true blue guru. Learning from a teacher that's trying to learn Java is horrible.

And with any programming language, learn the basic things like If-Then, loops, arrays, etc. and understand how they work. You might want to learn those basics, in well, BASIC. Download METAL and find some documents on basic things for BASIC then jump right into Java or C, whatever you plan on using.

Quote:in java there is nothing else but pointers to objects (except for the basic types), and they do behave as such

This is a misleading statement. While technically speaking all objects in Java are accessed via a pointers, They behave more like c++ references. Pointers imply access to raw memory addresses which ISN'T possible in Java from the language (only in the JVM)

So things like dereferencing, pointer arithmetic, arrays and all the other things that confuse beginners are not possible with Java. The result is more reliable and secure applications.

Recently I have slowly come to the conclusion that people spend far too much time thinking about programming and not enough time doing it.

Who cares whether java objects are pointers or references. Who cares whether a header includes other headers, who cares whether garbage collection is better than manual memory allocation. Who cares which is the best programming language.
After all there is nothing you can do about it so stop worrying and write some bloody code.
The shittiest FINISHED program is infinitely better than the best unfinished one.

the limitations that are inherent in small devices require you to change the way in which you design and code your application. if in doubt, what do you think it is better to use? java or C/C++?? is there a special reason?

I don't know how you found this ancient thread viren, but I found the conversation kind of interesting, and rather amusing (especially if you know some of the long-time members here), so I approved the post anyway.

My vote is for all and none. Learning only a single language makes you limited. You need to be able to move between them. If the goal is maximum job opportunities, the answer is definitely "all of them"!

But I wouldn't use any of these three for neither undergrad teaching nor my own programming, given a free choice. All three are badly designed languages, locked into design flaws (hacks) made by K&R in the early 70's.