Thursday, January 8, 2015

Is C++ a Relevant Language?

This has been a nagging question to me for a few years now, and is part of the reason I stopped coding as much a few years ago, only to pick it back up again over the past two years: Just how useful is it to learn a programming language like C++?  No, I'm not talking about python wrappers for it, or C#, or something "similar" like Java (and no, they are not similar like you may think).  I'm talking about low level C++, down to the metal, with just you and your compiler (IDE optionally too).  Had you asked me 2 years ago, I probably would have said C++ is just for gaming.  Ask me now, and I'll tell you it is still one of the most relevant languages out there.  Let's go over a few things about why C++ is a big deal, and why you should learn it if you don't know it.

It Still Has the Best Performance

C++ is still one of the most efficient languages out there for anything computationally expensive (as well as memory intensive in certain cases).  Whether you like it or not, python is still an interpreted language, and while the speeds might be faster now, they still will not match C++ in the end because of this fact.  Java, while easier, is just too bloated to come close to winning, and while not everything in C++ is portable, it's way better than C# is generally (Sorry guys, mono is still bad, I would know, I've tried to use it for projects before, though things like Unity can help to a degree to lessen the pain for game developers). While many languages are working on catching up (C# is now open source for example) and other languages are coming along (Go and Rust), I don't foresee them topping C++ for a while still, simply due to how long C++ has been around.

Virtual reality games are a perfect example of the
need for efficiency in applications.
While it's a pain to learn, and especially a pain to use at times, you will be able to squeeze out almost every bit of performance power that you'll need for any application out there, and with the need for code to be fast for users these days, this is very important.  Applications for things like game design, server applications, and even smartphone applications to a degree, all need these massive performance gains.  You will not get these speeds with something like Java.  The rise of virtual reality applications as well is helping to further this, as you need to be at a consistent sixty frames-per-second on mobile devices (ninety if you are on computer) to maintain the illusion of virtual reality.  While tools such as Unity and the Unreal Engine try to allow users to not need C++, there will be times where you need to make the jump, such as for applications that Unity can't handle, or implementing new features into the Unreal Engine.

With many consumers switching to cloud-based applications, a large amount of servers also need to be able to do large amounts of computing.  As a result, these too need the performance gains of a language like C++.  Many of the major applications are still written in C++ as a result of this (Apache, a popular web server used on Linux, is still written in C).  A language like Java just doesn't provide the ability to do things like provide web pages to a large amount of users all at once quickly and efficiently.  Even applications like Photoshop are still written in C++, because you just can not squeeze enough power out of a language like C# or Java and do everything that Photoshop does.  A quick Google search of many of your favorite programs will probably yield similar results: C++ is everywhere still because it has such a great performance.

It's a Valuable Asset

C++ is an old language, and a lot of the things it does are things that newer languages do in the background (IE: Memory management).  Because of that, learning how to code in C++ can help you better understand how languages like Java and C# do memory management.  This in turn means that when you use these languages, you know better what you can do to get better performance out of them.  Plus, many of the things you learn in C++ can be translated to other languages still, meaning you can still learn things about more modern languages, but more in-depth.

On top of that, C++ is still a highly used language in the world (As indicated by its TIOBE index).  This means that many companies are probably still using it, which would mean that companies are hiring for it.  As a result, knowing C++ can increase your "market value " when looking for a job if this is true (which it probably is based on how the TIOBE index is calculated).  This makes sense, especially since C++ still gets update (why update an "out of date" language).  A quick Google Search for C++ jobs shows that many companies are hiring for C++ developers, so this can be very helpful when you start your job hunt.

In the end, I highly recommend learning C++, and coding a specific project with it as well.  There are plenty of fun libraries for it still, and tons of fun things you can do with it.  There are still plenty of uses for it in the real world, you just have to look for them!  Feel free to leave your comments below!  What are your thoughts on learning C++?