3 ms·
Learning a language is all about your goals. Do you want to work in a domain where execution time is the most important factor, even more than developer time? G
by iends 13y ago
Learning a language is all about your goals. Do you want to work in a domain where execution time is the most important factor, even more than developer time? Games, finance, system software, etc often use C++ because speed and control over memory usage far outweighs the benefits of faster development time in other languages.
- w4rh4wk5 13y agoMy main interest lies in game development. To be a little more precise in game engine development. I'm studying computer science at the moment and I plan to work towards such a job after graduation. And afaik most game engines are written in C++ because of performance and memory management.
- camus2 13y ago> And afaik most game engines are written in C++ So why the heck are you asking the question ? you already know the answer.
- shervinafshar 13y agoI don't understand why OP is being heckled here. Obviously, the post wasn't a survey. The intent is to raise discussion and collect opinions.
- tokenrove 13y agoHave you read the source some modern game engines? Doom 3 is an interesting example (a bit old now, of course) because it's not particularly C++-like; IIRC from the last time I looked at it, C99 would do effectively everything it needs. This is not uncommon in the game industry. The game industry uses C++ because most of it is consistently about ten years behind the rest of the industry (remember how long it took them to switch from asm to C? and then from C to C++) -- the charitable viewpoint for this is that the industry is conservative; this is also a consequence of the toolset in the embedded world. Any natively-compiled language with a good compiler will produce pretty fast code without too much work, but to get really fast code in any language, you really need to know what the compiler is doing and be able to tweak it from the language; writing really fast code in C++ requires about as much work and as much thought (but less knowledge of your target compiler and runtime) as writing really fast code in Common Lisp or Scheme. It's important to note that it's actually easier to write slow code in C++ than in C if you're not careful; C++'s powerful abstractions cut both ways. Unless you explicitly forbid a number features, C++ takes away your ability to look at an isolated block of code and get an approximate "in-head" assembly of it. All that said, if you want to work in the game industry, you need to learn C++, you have no choice. But at the same time, you could be experimenting with building games in newer languages like D, Rust, and maybe more exotic choices like SML using MLton or Gambit Scheme (maybe using Stalin for a final pass). I hope this is helpful.