With all of the unpopular press that they get, why has history often proven C/C++ to be the right choice time and time again?
With all of the unpopular press that they get, why has history often proven C/C++ to be the right choice time and time again?
Twenty years ago when I learned Python, people told me it was a waste of time. Sure it is a nice language but you will never get a job doing it.
When I got into PHP ten years ago people told me it is a horrible language and basically dead already. Still, PHP was key to my career and I am making good money programming with in in 2025.
I used to be a C++ hater because that was the cool thing to do. Then I tried Unreal Engine and had to use C++ and discovered it is... fine. Really. There is a good reason it is heavily used in the gaming industry. I don't totally love it. The compile times are kind of annoying but C++ is not the only language suffering from that. If you need the performance and the ecosystem, C++ still isn't the worst choice.
-- Bjarne Stroustrup, The C++ Programming Language
Why has nothing replaced it? That depends on what you mean by replaced. Python, and Typescript/JavaScript have replaced it in many places. It's just low level programming where C++ has yet to be superceded. For that kind of programming there had not been many that could even approach the space until LLVM-based languages started coming out recently.
Some things come down to the OS system. We're still using the C FFI and other system elements designed around C. So until something better replaces those we're still using C on some level.
Finally, I think it's because the C/C++ manages to stay hidden. You don't need to know that it's written in C/C++ to use it.
”Unpopular press” generally means ”non-expert clickbait opinions”.
C++ as a language is abominable but the ecosystem (compiler support, tooling, libraries, established knowledge) is very hard to beat.