Jump to content

  • Log In with Google      Sign In   
  • Create Account


C++, should I switch?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
28 replies to this topic

#21 Acharis   Crossbones+   -  Reputation: 2351

Like
1Likes
Like

Posted 17 September 2012 - 04:04 AM

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 :))

Europe1300.eu - Historical Realistic Medieval Sim (BETA)


Sponsor:

#22 NightCreature83   Crossbones+   -  Reputation: 2488

Like
0Likes
Like

Posted 17 September 2012 - 06:49 AM

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 Posted Image 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 Posted Image) 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 Posted Image 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 Posted Image)

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, Mad Max

#23 jbadams   Senior Staff   -  Reputation: 14780

Like
0Likes
Like

Posted 17 September 2012 - 06:54 AM

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.

#24 superman3275   Crossbones+   -  Reputation: 1973

Like
2Likes
Like

Posted 17 September 2012 - 09:35 AM

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 ph34r.png!

Here's Breakout:
Breakout!

Want to ask about Python and / or Pygame? What about HTML5 / CSS3 / JavaScript? What about C++ and / or SFML 2 (and 1.6)? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

Superman3275@Gmail.com

or Personal-Message me on here smile.png!


#25 sugarrushx6   Members   -  Reputation: 105

Like
0Likes
Like

Posted 19 September 2012 - 03:22 PM

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.

#26 Acharis   Crossbones+   -  Reputation: 2351

Like
1Likes
Like

Posted 20 September 2012 - 03:12 AM

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.

Europe1300.eu - Historical Realistic Medieval Sim (BETA)


#27 NightCreature83   Crossbones+   -  Reputation: 2488

Like
1Likes
Like

Posted 20 September 2012 - 05:56 AM

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, Mad Max

#28 Bacterius   Crossbones+   -  Reputation: 7025

Like
0Likes
Like

Posted 20 September 2012 - 06:23 AM

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 Posted Image

"The best comment is a deleted comment."


#29 jbadams   Senior Staff   -  Reputation: 14780

Like
0Likes
Like

Posted 21 September 2012 - 12:02 AM

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

Congratulations, that's great! Posted Image




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS