Advertisement

is c++ really a must?

Started by June 19, 2013 07:36 PM
51 comments, last by Amadeus H 11 years, 7 months ago


The thing i'm aware of is spending my time on learning language which i may not use like ever.

You will use the knowledge you learned in C++ in other things. Don't assume that learning C++ only applies to C++. You will surprised how much of the little things can be applicable to other languages. Identifying performance issues, ambiguous syntax, memory allocations, are some of the FUN things that you learn in C++.

By fun, you mean spending weeks trying to find an obscured memory leak caused by an imposable to find pointer ?

I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.

~ Ralph Waldo Emerson

Why does this question keep getting asked? Is there some organisation out there determined to discourage everyone programming games in a different language OR are people just not using the search function?

Because C++ has symbols in its name so it must be for pro's and that if you don't know C++ you'll never get a job, I guess that's the reasoning behind it. I think it's natural to wonder, since people typically seek some form of return on investment and that applies to learning languages as well (evidenced by the "what if I end up never using it" reply above), but in this case, since programming concepts are mainly language-agnostic, I think it's really not that important. A good programmer who knows, say C#, but nothing about C++ can pick it up in a few days and become proficient in a few months.

I think knowing more than one language is far more important than becoming a guru in a single one, because even though the core of your game might be written in C++, the rest will likely be using other languages and perhaps even scripting languages, like C#, Lua, Python, and so on. But as we all know, when you have a hammer, everything looks like a nail. Programming is also about using the right tool for the job, and by sticking with a single language you are severely hampering your ability to do that.

So the bottom line is, yes, learn C++. Why not? It can only benefit you and frankly doesn't take that long. Becoming productive in C++ isn't a 20-year ordeal like some people would have you believe, unless you really want to know *everything* about the language and that isn't necessary to make games (not that I'm saying it's a bad thing to do so)

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

Advertisement


The thing i'm aware of is spending my time on learning language which i may not use like ever.

You will use the knowledge you learned in C++ in other things. Don't assume that learning C++ only applies to C++. You will surprised how much of the little things can be applicable to other languages. Identifying performance issues, ambiguous syntax, memory allocations, are some of the FUN things that you learn in C++.

By fun, you mean spending weeks trying to find an obscured memory leak caused by an imposable to find pointer ?

That. And buffer overlows :D


A good programmer who knows, say C#, but nothing about C++ can pick it up in a few days and become proficient in a few months.

While I agree with the rest of your post, but I have to say this is just wrong (and demonstrably so. See if you can find Washus old C++ quiz). C++ is full of little quirks and gotchas that constantly surprise people who have been working with the language for years, never mind those who have just learned it. Scott Meyers has pretty much made a career out of it.

TBF, all languages have their idiosyncrasies, but C++ has way more than most.

A C++ programmer going to language x will almost certainly have an easier time than the other way round.

if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

Yes you have to. [rant begins]Sadly many CS programs are Java schools now, had to learn some my self by self study...[rant ends]

"The only thing that interferes with my learning is my education"

Albert Einstein

"It is a miracle that curiosity survives formal education"

Albert Einstein


A good programmer who knows, say C#, but nothing about C++ can pick it up in a few days and become proficient in a few months.

In the other direction (C++ -> managed language), sure. Managed language -> C++? Not so much.

I have watched it takes years to convert a skilled Java programmer to even a moderately competent C++ programmer. The language has so many damn foibles and edge cases that if you don't cut your teeth on it early, it's an uphill battle.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Advertisement

A good programmer who knows, say C#, but nothing about C++ can pick it up in a few days and become proficient in a few months.

In the other direction (C++ -> managed language), sure. Managed language -> C++? Not so much.


Even going the other way isn't quite as easy as people think; I'm mainly a C++ monkey but I do know C# and can write C# apps with little problem... the issues is I tend to write BAD C# apps which would make a full time C# developer cry. Granted, I'm getting better at writing more idiomatic C# as I write more of it but I'm still aware I'm doing bits poorly.

"Hey everyone, i was wondering if c++ is really a must in game industry."

Yes. It's in all the job adverts.

It doesn't matter if you, or I or anyone on this thread thinks it's a must or not. It's on the job adverts. If you don't have it, you'll find it hard to get a job. Unfair! Unfair!! Rant, rave etc. Doesn't matter. Learn it.

A good programmer who knows, say C#, but nothing about C++ can pick it up in a few days and become proficient in a few months.

In the other direction (C++ -> managed language), sure. Managed language -> C++? Not so much.


Even going the other way isn't quite as easy as people think; I'm mainly a C++ monkey but I do know C# and can write C# apps with little problem... the issues is I tend to write BAD C# apps which would make a full time C# developer cry. Granted, I'm getting better at writing more idiomatic C# as I write more of it but I'm still aware I'm doing bits poorly.

The big difference really is that managed languages won't blow up in your face as easily, it is easier to get by with Java or C# without actually knowing the language and its quirks as the most common result of doing things wrong is suboptimal performance, which is preferable to memory leaks, security holes, undefined behaviour and seemingly random crashes.

If we take Java for example, can one of the C++ programmers here write a code snippet in Java to create a string containing the numbers 1 to 10.000 separated by commas ?

[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

Wow, now i feel really dumb because of believing that satire :/ Anyways thanks for clearing things up for me. I have to admit that I'm shocked how many replies I got. Really nice forum! thanks everyone :)

This topic is closed to new replies.

Advertisement