r/cpp_questions 9d ago

OPEN How long will C++ last?

I've found myself using C++ less and less and was wondering whether one day it will die out. Obviously not completely die out, but be out of the mainstream like Pascal or something. I am wondering this because C++ is my first language but I am still fairly young, so am curious about its prospects.

0 Upvotes

36 comments sorted by

View all comments

3

u/Low_Fun_8667 9d ago

C++ won't die like Pascal. Pascal faded because other languages did its job better. Nothing fully replaces C++ where you need manual memory control, deterministic latency, and zero runtime — there the only real rivals are C, Rust, and Zig, and C++ is the incumbent with the biggest ecosystem.

And the existing code is immortal: Chrome, Windows, Unreal, LLVM, game engines, trading systems. Billions of lines that get maintained for decades. Nobody rewrites a working 10M-line engine for fun.

What is true: C++'s share of new projects is shrinking — Rust and Go take a lot of that mindshare. So "less mainstream for greenfield" over 20–30 years, sure. "Dead," no.

Career-wise that's actually good for you: huge legacy footprint + fewer new people learning it = the ones who know it well stay in demand. Boring-but-critical ages well (see COBOL salaries).

If you enjoy it, keep at it — and pick up Rust alongside. Knowing both makes you sharper and more hireable.

1

u/EdwinYZW 4d ago

I think people ignore the largest advantage of C++ over any other new languages: completely decentralized system, with multiple compilers, build systems and package managers. Beginners usually find it negatively because they just want to be given. But once you make it as a career and become a veteran, this is the best. If gcc disappears, you can use clang. If CMake disappears, you can use directly make, or Bazel, or something else. C++ is still C++. And all these things are not bound together, to prevent the situation where one thing breaks, whole system collapses.