Is C++ Still Worth to Learn

C++ has been there for years. It is one of the earliest programming languages. Learning c++ is not trivial. The question is that, since there are so many other powerful language out there today, is it still worth the time to learn the hard core programming language, c++? In this post, we are going to discuss that.

Why Is C++ Hard To Learn?

C++ is hard to learn because that it is low level. It involves too many details when comes to implement a specific feature. c++ is not the kind of language (e.g., python), which you only need to focus on the programming logic. When coding in c++, you’ll also have to be aware of what you allocated in memory, where they are, and you are responsible for deallocating them after finish using them. This responsibility makes programming a lot more complicated than it could have been.

You might think it is a downside of c++ to not have a gabage colection system, but this is really something that is arguable. Although c++ does not help you recycle your objects in memory (when no one is using them), it also does not limit you from doing whatever you want. This gives you a lot more flexibility than other languages. For example, you can release the memory for objects right after they stop being used, where which is not quite straighforward in other language like python.

When coding in c++, you need to think like the computer system thinks. Whenever you do something in c++, you’ll need to understand what is happening under the hood. If you can reach to this level, you can use c++ at ease. But it definitely requires you to know a lot more than you need know to use other languages. The extra stuff you’ll need to learn to master c++ is the challenging part.

What Is Your Goal?

The question is, in 2020s, there are many awesome programming language out there, is c++ still worth to learn? I think it depends on your goal.

If you think, you just want to implement certain simple features, for example, sorting all lines in a files, you do not need to learn c++. There are many other languages that can achieve the same goal way easier.

But if you want to really understand how computer system works, c++ is definitely something you want to learn. C++ is a very powerful programming language that allow you to control CPU directly, because your c++ code is compiled into assembly, and get executed directly by CPU. The process of mastering c++ is pretty much the same as the one of mastering c++ compiler, part of the Operating System mechanisms (virtual memory, threads, processes, etc), and assembly language. It’ll give you a comprehensive view about the computer system.