C++, should I switch?

Started by
27 comments, last by jbadams 11 years, 7 months ago
Agreed with many posters. Different languages have different strengths. Learn other languages AS WELL. Looks good on the resume too. As far as high level vs low level... I like to view it as driving an automatic vs driving a manual. For the ultimate in performance, drive manual. But be warned, if you're a bad manual driver you'll leave your gearbox on the road if not crash and burn. Myself, I'm happy to drive auto these days, as most of the time I just want to get from point A to point B with the least effort.

C and C++ are great for learning how computers work (as is assembly), good for writing super-optimised functions, and they're good for accessing low level APIs. But trying to find/write the right library to do something I consider standard, dealing with memory allocation/deallocation, header files, pointer arithmetic, arcane parameters and return codes from Windows APIs? Yech. Not for me.
Advertisement
Do not switch, at least not for the reasons you listed.

I was in a similar situation, I was coding in C++ for many years, then I thought I am too outdated and should switch to the modern Java. I tried it for a week and... switched back :) Yes, these other languages have some nice tricks (loved the Java string manipulation, C++ without doubt have it far too primitive), no doubt, still... I simply have not seen that much difference between Java and C++ (Java lovers, feel free to kill me for this statement :D) except that my old habits were not working anymore. Plus C++ has advantages on it's own. Maybe if you were starting and deciding which one to learn without already having prior experience, then maybe, just maybe...

Also, take into account your "I really like C++" part, I think such statement adds +2 points to the language desirabilty :) Likes and dislikes are very important and will affect how efficient you are with that language, even if the language was inferior on it's own (not that I imply that C/C++ is inferior to anything, I'm C++ lover too :))

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube


Do not switch, at least not for the reasons you listed.

I was in a similar situation, I was coding in C++ for many years, then I thought I am too outdated and should switch to the modern Java. I tried it for a week and... switched back smile.png Yes, these other languages have some nice tricks (loved the Java string manipulation, C++ without doubt have it far too primitive), no doubt, still... I simply have not seen that much difference between Java and C++ (Java lovers, feel free to kill me for this statement biggrin.png) except that my old habits were not working anymore. Plus C++ has advantages on it's own. Maybe if you were starting and deciding which one to learn without already having prior experience, then maybe, just maybe...

Also, take into account your "I really like C++" part, I think such statement adds +2 points to the language desirabilty smile.png Likes and dislikes are very important and will affect how efficient you are with that language, even if the language was inferior on it's own (not that I imply that C/C++ is inferior to anything, I'm C++ lover too smile.png)

I like development in C++. however for home projects I switched to C# as I know both languages anyway. But the reason behind the switch for home dev in C# is more that I rather like writing code that is useful instead of having to write layers of biolerplate code before I can actually do the thing I want to. I only want to spend an hour here and there at home, I like to do other things as well in my own time then sit in front of a PC, I do that at work, where I do use C++, for 8 hours on end anyway.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion


I simply have not seen that much difference between Java and C++ except that my old habits were not working anymore.

To effectively use a new language you really need to develop new habits in line with the idioms and common usages of that language. Using Java (or C#, or Python, or...) the same way as you use C++ will not yield an ideal experience.

- Jason Astle-Adams

Well, I stuck with C++ and have started learning SFML. So far I've programmed the bulk of pong (Without a tutorial!). All I need to do is fix the collision detection when I get home and add an extra line of code to the enemy A.I. I hope everyone isn't that mad at me for that "Definitive Language War" Thread, Most of that stuff was pulled from here. :(

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

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.
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"
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.

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube


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.

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.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion


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.

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 happy.png

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”


So far I've programmed the bulk of pong (Without a tutorial!)

Congratulations, that's great! smile.png

- Jason Astle-Adams

This topic is closed to new replies.

Advertisement