3 ms·
I know probably 99% of the C++ standard and used C++ in anger for years, and I do not recommend learning it unless you need to do so. Getting into the (console
by pmjordan 18y ago
I know probably 99% of the C++ standard and used C++ in anger for years, and I do not recommend learning it unless you need to do so. Getting into the (console & PC) game industry is one of the only reasons I can think of. Even so, most veteran game programmers use only a small subset of C++, and most of the code is effectively C.
C++ is a terrible hack, and if you're very familiar with other languages you'll be shocked by what is considered beautiful or elegant in the C++ world. (e.g. Boost)
If you want to just low-level optimise parts of a program written in a high-level language, C++ is actually a pretty poor choice. C is actually going to give you fewer headaches with language interop, as it has a standardised ABI. There are tools to do, say, C++ to Java interop, but I can't recommend even trying to do that kind of thing. In comparison, JNI (implementing Java class functions in C) is a walk in the park.
Yes, you can do anything you can do with C in C++. Yes, C practices (char* strings, etc.) are considered bad style by the C++ world. I'm going to just come out and say it: in my opinion, the C++ world has no idea what good style is.
As for learning C, it's a very good idea. You'll learn a whole load of things that will help you even when you're not using C itself. Hopefully, you won't need to use C itself all that much in practice, but it's a damn handy language to know, even if all you use it for is to write glue code between some libraries and your favourite language.