Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Maiku

Java or C++ first?

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

Hey you guys, I am new to programming. Infact, the only language I know is HTML... But I would like to learn. Would you guys suggest learning Java, or C/C++ first? And, what are the pro''s and con''s of those two languages? Thanks for your help! -Mike aka Maiku

Share this post


Link to post
Share on other sites
Advertisement
Just an initial disclaimer: neither way is truly ''better''. My personal stance is that you should learn C++ first. I even have the weirder ideas that you should learn C before C++. However, there should be tons of people disagreeing with me that reply shortly, so take everything we suggest as just that, a suggestion.

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
If your new to programming, the pro''s and con''s don''t really affect you. Speed, compatibility, and advanced uses just don''t apply to a newbie. The only real thing that I think would affect you is that the Java SDK is quite a meaty download, and along with the relatively slow preformance of Java compilers, it adds un-needed headaches. Also, there are an enormouse amount of C++ resources on the web and in print. And, personally, I found the C++ syntax easier to read than Java, but might just be me.
I''m not saying that C++ is better than Java, just that for a new programmer C++ might be easier to get started with. And, if your not just considering C++ and Java, I recommend Pascal. There is addequate information out there, if you look, and it is MUCH easier to learn and read than both C++ and Java. When you become fairly proficient you can move onto Delphi for Windows programming!
Whatever you choose, good luck on you way to becomming a programing master!

Share this post


Link to post
Share on other sites
Sorry, I cannot recommend C++ for a first language. There are way too many pitfalls and quirks in it, eg char pointers instead of a native string type(yes, I know all about std::string, but is it really that much easier to use for a beginner than a char array?), nasty memory management issues, complex syntax and an unfriendly standard library(yes, STL is a great design in terms of power and flexibility, but compared to container classes in other languages its extremely complex). I really cannot imagine the reasoning behind the earlier posters claim that c++ would be easier to pick up for a beginner.

Learning C++ gets you bogged down in irrelevant language mechanics instead of concentrating on things that are important, such as good style, proper design methods and understanding of algorithms and datastructures. Its also not very motivating to be stuck doing console mode programs for the first couple of months.

Java is the opposite of all that. It has a clean and simple syntax, a much more pure OO approach(its still a hybrid, tho) a very usable standard library(it even has hashtables, something the c++ standards committee never got around to voting on) and garbage collection. It even lets you do basic GUI''s in a matter of days, increasing the motivational factor quite drastically.

I cannot agree on C being a good first language either. My impression is that a lot of programmers who studied C extensively before learning C++, never really progress beyond that C stage. There are lots of things that make a lot of sense to do in C, but that you really shouldnt be doing in C++. See here for Bjarne Stroustrup''s rationale for not learning C before C++.

The bottom line is, learning C++ teaches you C++. Learning Java might even teach you programming too. I believe thats the reason why most colleges have started using Java in their introductory programming classes, because it lets them teach actual programming at a much earlier stage instead of reiterating language technicalities for months at end.
Once you become a proficient programmer, you will find that the language used doesnt really matter that much, and you will be able to pick up new languages quickly. So go with Java(in my mind C# or Python would make great first languages too), learn to program, then you can start focusing on what kind of language would serve best for _your_ purposes.


"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - - Stephen Roberts

Share this post


Link to post
Share on other sites
I would suggest you learn Java first. Java is much simpler and less complicated than C/C++. You dont have to become a master at it to learn C++. Just be thorough enuf with the concepts, syntax and so on. After learning Java, you will find learning C++ much easier. But C++ has additional stuffs like pointers...these may take slightly longer to learn.

Basically, Java is good for web applications and application programs but not for games. Learn C++ for games and Java to develop applications. I am saying this from my experience.

Share this post


Link to post
Share on other sites
I wasnt referring to your post, Null:
quote:
Original post by NeOeN

I''m not saying that C++ is better than Java, just that for a new programmer C++ might be easier to get started with. ¨







"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - - Stephen Roberts

Share this post


Link to post
Share on other sites
Personally, I believe that you should learn C++. You DON''T need to learn C before you learn C++. In fact, if you know C++ you can easily understand C code, however, it''s doesn''t work the other way around (as easily). If you know C++, you can also understand Java.

Jason Arora
jason@pubism.com
http://www.pubism.com

Share this post


Link to post
Share on other sites
Bah, typo...should have been "poster"

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - - Stephen Roberts

Share this post


Link to post
Share on other sites

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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!