Why is C++ Notoriously Difficult?

C++ and the complex modern software

Neo Young
Technology Hits
4 min readApr 12, 2024

--

Photo by Max Duzij on Unsplash

Among various programming languages, C++ is famous for being difficult. For decades, people who look down on this ancient language have been declaring that “C++ is dead”, but now C++ is still widely used and vibrant. In this story, I am going to explain why C++ is difficult.

Note that this story would be easy to follow even if you know little about coding or C++.

Reason 1: High Flexibility

What things are hard for you?

— When you don’t know what to do with it.

What’s even harder?

— When you don’t know what to do with, but there are various solutions provided by predecessors in front of you, yet none of them are easily understood.

C++ is like this. Not only is there no unique solution to tasks, there is also no unique solution to programming paradigms or libraries.

In C++, there could be dozens of solutions for every task you want to accomplish.

It means that the same task can be implemented in twenty different styles by ten different people, and they would all work.

C++’s history spans nearly half a century, with countless programmers typing down countless lines of code, each with different styles and relying on different libraries and frameworks. This makes learning C++ a vast and complex endeavor.

Photo by Tim Gouw on Unsplash

If you’re just writing code in C++ for yourself, it’s not that complicated, because you can have your own style and paradigms, and many weird tricks might never be used.

But if you’re involved in commercial development, you’ll inevitably face a huge amount of weird unfamiliar codes, in many people’s opinion, “shit-mountain code.” And trying to understand others’ C++ code is much more difficult than in other languages. After all, C++ allows for so many programming paradigms. Every time you see a piece of C++ code that’s different from your usual style, you might wonder,

“Do I really know C++?”

Reason 2: It is the first option for many cases

C++ is widely used in various industrial software, including operating systems, compilers, browsers, game engines, databases, and more. We can say that in almost any field, for any data structure, algorithm, or design paradigms, they have been validated in C++ countless times.

As these large industrial software systems become more complex over time, they eventually turn into the so-called “shit mountains”, which is a nightmare for programmers.

In fact, shit-mountains are the ultimate destination of any complex system.

Photo by Markus Spiske on Unsplash

Companies like Microsoft, Google, Oracle, their products are all shit-mountains. Every time Oracle releases a feature, the entire company’s servers need to be tested at full speed for several months. The open-source code of the Chromium browser is over a dozen gigs. Submitting your own insignificant code on such a daunting mountain would be intimidating.

This may make you think that Microsoft and Google are terrible companies, but in reality, they are the best software companies on Earth. The highest shit mountains in the world are created by the smartest minds. If they are replaced with ordinary programmers, the system might collapse before they build a small hill.

At this point, you might realize that C++ is actually a very successful language. It has become the cornerstone language of these shit mountains, which means that C++ can build the most complex software systems in the world and withstand the test of time.

Although no one likes shit-mountain code, code that has successfully run in production is more valuable than unverified code.

Moreover, C++ has developed compilers, IDEs, debuggers, testing tools, application frameworks, and algorithm libraries for countless languages. Although many new programming languages are favored by the new generation of programmers, when their performance falls short, programmers quickly come up with some C++ algorithm packages to save their day.

By now, you may realize that C++ is very difficult not only because of its own characteristics but also because it has become the cornerstone language of modern complex software systems. If you want to stand on the shoulders of giants, you cannot bypass C++.

The true challenge lies not in mastering C++ itself, but in understanding the complex systems built upon it.

Thanks for reading!

--

--

Neo Young
Technology Hits

I find joy in expressing myself and connecting with you through my writing.