• Advertisement
Sign in to follow this  

C++, should I switch?

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

[quote name='sugarrushx6' timestamp='1348089731' post='4981834']C++ has an issue with cross-platform compatibility, like if on Windows you write it, you have to write it differently for Mac, and Linux. Java solves that problem. "Write once, run anywhere"[/quote]That's exaggeration. It's true that in C/C++ you can't drop the same "executable" and expect it to work but "writing it differently for each platform" is not needed at all. Also, I have heard a lot of complains from Java devs that "write once run everywhere" is not always true and they called it "write ones, debug everywhere", but that's what I have just heard from them, so I can not tell if this is true. Anyway, Java is for sure nicer when it comes to crossplatform development, in C++ you need to start writing with it in mind (using crossplatform libraries and APIs) or you will get into trouble.

Personally, I don't know what I would suggest for someone who starts, but if you already know C++ sufficiently, switching to anything else probably wouldn't provide any outstanding gains worth the switch, change of habits, abandoning your favourite libraries, etc.

Share this post


Link to post
Share on other sites
Advertisement
[quote name='sugarrushx6' timestamp='1348089731' post='4981834']
In my opinion, you shouldn't really *switch*, learning more languages will just expand your job opportunities, and also solve solutions to other languages problems, and vice versa.

For example:
C++ has an issue with cross-platform compatibility, like if on Windows you write it, you have to write it differently for Mac, and Linux. Java solves that problem. "Write once, run anywhere"
Java has an issue with how you have to download a JRE, and install it; plus, Java is not RAM friendly. C++ runs off the OS it's running on.

Also in my opinion, Java is more effective than C++ because Java is MUCH more easy to learn than C++, therefore making it a great beginners language, next to Python; and Java includes it's own graphics and GUI libraries.
[/quote]
That problem goes away with 64bit C++ windows has let go of it's different calling conventions which except from OS-API calls should be the same on most platforms, also the win nt api (any version of windows after win 2k) can cope with a lot of POSIX standard calls.

Share this post


Link to post
Share on other sites
[quote name='NightCreature83' timestamp='1348142184' post='4981994']
That problem goes away with 64bit C++ windows has let go of it's different calling conventions which except from OS-API calls should be the same on most platforms, also the win nt api (any version of windows after win 2k) can cope with a lot of POSIX standard calls.
[/quote]
Yeah... except the 64-bit Microsoft ABI differs just a teensy tiny bit in parameter passing to the AMD64 one - so you'll still have to mind portability when writing inline assembly, reading function parameters from registers in particular. And this time, you don't even get the choice of changing the calling convention [img]http://public.gamedev.net//public/style_emoticons/default/happy.png[/img]

Share this post


Link to post
Share on other sites
[quote name='superman3275' timestamp='1347896111' post='4980907']
So far I've programmed the bulk of pong (Without a tutorial!)
[/quote]
Congratulations, that's great! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Share this post


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

  • Advertisement