r/cpp • u/AdventurousPath6492 • Feb 24 '26
So, is C++ doomed?
I've been watching closely all the news related to C++ rewrites recently. I must admit the Rust has got a real traction.
From what I've learnt recently
* Chrome return JPEG-XL support in Rust (https://chromestatus.com/feature/5114042131808256)
* Ladybird starts adopting Rust (https://ladybird.org/posts/adopting-rust/)
With the adoption of LLM agentic tools the rewrites will be much easier which was proven by the LadyBird and its LibJs engine.
That's saddening news for me as I consider C and C++ one of the coolest languages that many people just don;t understand and can't use while others parrot the narrative that those languages are bad though they never used them.
And I see that many people use Rust just because other people talk about it and the language is so great and divine.
And Google and MS and other big tech bros try to reduce the C/C++ codebase.
So is C++ doomed?
33
u/CaptainCrowbar Feb 24 '26
Ah, a classic example of Betteridge's law of headlines
18
u/UnicycleBloke Feb 24 '26
Reports of C++'s death have been greatly exaggerated. With apologies to Samuel Clemens.
12
u/bearheart Feb 24 '26
I’ve been coding in C and C++ since the 1970s and people have been predicting its demise all along.
With apologies to Winston Churchill, it’s “the worst language except for all the others.”
7
u/I_pretend_2_know Feb 24 '26
No, it doesn't. It is just internet noise and Reddit blabbing.
There's barely any Rust in job boards. And most of the positions for Rust are crypto.
In crucial areas like embedded systems or web-backend Rust is a bad fit (C for the first; Java, Node or Go for the second are better).
"Rust in the Linux kernel" is almost an urban legend. It is used just in a few drivers and most of the core developers despise the language. Ladybird is an obscure project, it only became relevant once it adopted Rust. It will be forgotten again in a week.
Rust is mostly hype. You're paying too much attention to social media.
78
u/STL MSVC STL Dev Feb 24 '26
This is a waste of time. Go build things.
3
u/Expert-Map-1126 vcpkg maintainer BillyONeal Feb 26 '26
I say this as a former standard library maintainer and current maintainer of things mostly in service of C++:
If we as an industry adopt a memory safe replacement, that is GOOD and should be celebrated.
Programming languages are tools to do things. Good craftsmen don't use the wrong tool just because they like using it.
20
u/Mantissa-64 Feb 24 '26
Why does it matter so much to you? Your tone implies that you'll be legitimately upset if C++ vanishes tomorrow. Like C++ is one football team and Rust is another.
Just learn both and you'll find that Rust has enough downsides that it probably won't be replacing C++, the same way you can find plenty of people who still use C for their day job and/or hobby projects despite the existence of C++.
We're engineers. We use the right tool for the job, regardless of the name printed on it.
8
u/pedersenk Feb 25 '26
Rather than looking at hobby projects and the "noise" online; check out job listings online. There is very little Rust, almost none in fact.
7
u/mredding Feb 24 '26
No, of course not.
Good for Rust. Know what happened when Java hit the scene? Some shit got rewritten. It wasn't a big deal then, and it's not a big deal now. It may be better for their product if C++ isn't a good fit for them, or if they're not competent enough in it to utilize it effectively, or if the product was born out of a prototype and has too much technical debt and is in need of a rewrite anyway.
But rewrites are a roll of the dice. You mean you're going to, what, invest a year or two rewriting something, just to get back to the business position you already were? Meanwhile, what are your competition doing? Did they stop their trajectories so you could rewrite your product?
Do you think customers care WHAT the software is written in?
If you look at the rates of growth, Rust is growing quickly, quicker than C++. But C++ is still also growing, and because growth is a percent change, C++ gained more new developers and projects than Rust HAS developers OR projects.
The magnitudes of these two communities are not the same.
Andreas rewrote LadyBird AGAIN?!? I thought he went with Jakt. Or was it Swift? Or was it...
And notice he went byte-for-byte parity with C++ of all languages. Apparently the gold-standard. It's a technical achievement to be sure, but it wasn't FOR Rust, and it doesn't assure success for others. The same process can be used to port to any language. It didn't have to be Rust. We could use the same process to port Rust programs to C++.
You're very optimistic about technology in it's infancy and how it performed in a curated and orchestrated demonstrator by a company that has a very vested interest in branding, street cred, and attracting investors. Back when Swift was the new hotness, it was Swift. Now that Rust is the new hotness, that's where the easy investor money is...
There is more going on here than you're realizing.
It's not even all that interesting news. It's just information. A people did a thing...
People don't understand a lot of things. If people in our industry don't understand C... Fuckin' C... Don't expect them to understand Rust, either. If they don't understand C++ they definitely won't understand Rust or any other higher level language.
While others have a financial interest in detracting C++.
New hotness, aka hype. And it is indeed a fun new language. It's got a novel thing, the borrow checker. It's fun to get in on something early.
Call me when Rust is 40 years old. Will they maintain backward compatibility? Or will they break every new version? And if the latter, then why call each new version Rust? Then what was the old version? And why are they incompatible? If they go with maintaining compatibility, they're going to collect a bunch of cruft and warts and mistakes.
And they've both failed to eliminate it, mostly because they can't.
That's a funny thing to ask about the 3rd most popular programming language (and growing).
There are two types of languages - those that everyone bitches about, and those no one uses.
19
u/ThePeoplesPoetIsDead Feb 24 '26
No, it isn't
2
u/LuisAyuso Feb 24 '26
No it isn't. It is and still will be the first choice for a few industrial niches. It is just one more tool, would you change a screw driver?
5
u/Raknarg Feb 25 '26
No, C++ has a massive scope and a wide net and over time tools way better for the job are going to replace it where it makes sense. There's still plenty of reason for people to choose C++.
15
u/gnolex Feb 24 '26
Rust has already proven itself inadequate for projects that require fast iteration and prototyping, like video games. Unless you're using a game engine with dedicated support for Rust, making games in Rust is not a pleasant experience. The cost of constantly refactoring prototype code to keep provable memory safety guarantees is too large when it comes to working low-level, like at game engine level. C++ is likely to remain THE language in such areas.
Also, Rust cannot produce machine code for many lesser known architectures due to the way Rust compiler works. That's where C fills in the space, the language is so simple that a compiler for it can be written for any architecture. It's also really fast to compile, unlike Rust. Unless Rust somehow adapts it won't be able to replace C in its entirety.
Both C and C++ are on track to evolution towards stricter memory safety mechanisms. So the main issues are being actively worked on. I wouldn't worry about people saying that these languages are dying because they're obsolete. They're doing quite fine.
7
u/Nervous-Pin9297 Feb 24 '26
Ladybird just needs to build and release something already
5
u/kaerfdeeps Feb 24 '26
MS is reducing c++ codebase because "1 programmer, 1 month, 1000000 loc" which makes people to ditch windows
4
u/JuanAG Feb 24 '26
C++ has been doing a bad job as a whole since a long time so it is normal that when people can choose they do, some will keep C++ and others anything else
If C++ just did a little better job and didnt piss some devs so much this wont even happened in the first place, Python is a good example, not perfect but does the job well enough and there is little to none reason to create a "Python replacement", people dont engage or try on that since who cares. C++ should have focused a little more on the user experience as a whole and nothing like this will be happening, since it didnt people try to fix the issues how they can, some creating another lang (Rust, Zig, Carbon, Nim, ....) and others creating an improved tool like Circle, if you keep trying at some point one will do it, D eated the dust and barely anyone remenbers it but try after try some will make people click, Rust has done more or less that and well, it is being used in enterprise instead of C++, a shame but it is how things are
Time will tell, doomed is i think a too strong word but C++ is for sure taking a big hit
3
u/L_uciferMorningstar Feb 24 '26
Yeah it's over. Go learn to program with AI.
3
u/owjfaigs222 Feb 24 '26
Well I knew a guy in my CS class who was really good and knew a lot specifically about programming languages. As he put it C++ is horrible but there is nothing better out there.
1
u/Wh00ster Feb 25 '26
I think it really depends on the domain. Also think the domains it’s relevant for will continue to shrink.
For general backend web server or app stuff, I think it’ll wane. For more performance sensitive systems I think it could eventually wane but will remain dominant for a while. Just too much inertia for things like RocksDB, simulators and game engines, compute engines. Things that aren’t often replaced. If it’s performance sensitive but business logic (so rewritten a lot) then I see a move to Rust (if it hasn’t been moved to Go already).
1
u/Epiq122 May 15 '26
job market says otherwise
1
u/AnyPhotograph7804 Feb 24 '26
Aaaaaaaand the next Rust spam bot.
0
u/spiderzork Feb 24 '26
JavaScripts has an extremely detailed specification, which makes it much easier to implement than other libraries. Whether of not it is performant is another question as well
0
u/[deleted] Feb 24 '26
[deleted] — view deleted comment
2
u/[deleted] Feb 24 '26
[removed] — view removed comment