10 reasons you should know C++
First of all, as I know that this can be a sensible topic for someones and that it can turn to a religious war, I want to remark that I’m only saying that, for a programmer, to know C++ is a good thing to do, and I am NOT saying neither of this:
- That C++ is the best language around, as that concept does not exist.
- That you should use it every time you have to program something. The language to choose for a project depends, of course, on the project itself.
- That it is the only language you should know. It is not.
Here comes the list. There are some reasons more focused at the knowledge you can get, and others more focused at work and employment issues.
1. C++ has influences in many other current languages
When other currently most used languages, such as Java or C# appeared, C++ had already been here for a while, and, as one of their goals was to substitute C++, is no surprise that they have been highly influenced by it. So, learning C++ you will learn an important subset of many other languages, making you easier to learn them later if you ever need to.
2. Huge amounts of documentation for it
As, probably, the most used language in the last 20-25 years, there are tons of resources oriented at it. Books, forums, blogs, you will find virtually any kind of help you may dream of.
3. Many code samples are coded in C++
Whenever someone, including book authors, need to write some code and the audience is not expected to share any other language, he will usually implement that code in C++. So, as in many cases you are actually expected to understand it, it would be good for you to really understand it well, in order to learn more from the source you are reading/listening.
4. It will provide you a better understanding of other systems
Some people criticizes C++ as difficult for explicitly dealing with low-level things as pointers or explicit memory management. While it’s true that in some circumstances you would get no benefit in dealing with them, and it’s then more a source of bugs than anything else, it’s also true that having a sincere, deep understanding of them will make you a better programmer, and you will have a wider comprehension of the system, even when programming on some language that abstracts those concepts.
5. Templates & generic programming
C++ provides you the possibility of programming functions not taking into account the types of some variables or some of the arguments. This opened the possibility of truly algorithmics, and has been used in many other languages since then.
6. Interfacing languages
There are lots of different libraries, and many of them are in C++. If you program in any other language, chances are that some day you will have to interface some library, and it will probably be in C++, so you’ll have to interface it, and knowing C++ will save you time.
7. Efficient machine code produced by C++ compilers
C++ has had efficiency as an objective from the start, and, while the gap has diminished in recent years, C++ compilers are still the ones producing most efficient machine code. You may find yourself in the need of writing some part of code where you must control things that higher level languages do not allow you. Knowing C++ could help you then.
8. There will always (or, at least, for a very long time) be a niche for C++
It’s true that the C++ ratio usage has diminished in the last, say, 10 years. That’s mostly because it was used for applications that did not really needed a lot of control and performance. But almost all of those applications are no longer written in C++ any more. Most of the projects being currently developed in C++ do actually have time or space constraints, and they use a C++ for a reason. Systems programming, simulations, game programming and some others are niches that are not going to switch to another language for a long while.
9. C++ projects are more interesting than the average
As pointed out by Alastair Rankine in a post which I agree with, C++ projects are over-represented in the set of interesting projects and under-represented in the rest of profitable projects. All other things being equal, working on an interesting project instead of non-interesting one is a great change.
10. You will hardly be seen as a hacker if you don’t know C++
This is very important if looking for a new job. Companies (intelligent ones, at least), when looking for programmers, prefer hackers, people with passion for programming. This, again, happens most on interesting projects, which are usually harder too. Knowing C++ you will not be immediately seen as a hacker, but the inverse applies here. There are few hackers that don’t know C++, and your reputation as a programmer will be lower if you don’t know it.