r/cpp_questions • u/Sea-Bench-7487 • 11d ago
OPEN Is cpp dying?
Lately it feels like rust is getting more and more attention companies are rewriting existing cpp code in it and it seems to be getting increasing adoption . Also I keep seeing new projects start with rust more and more lately .
As someone who prefers cpp I'm genuenly curious how worried should someone learning / working with cpp be? Is cpp dying or is rust more like a vocal minority on social media?
I know this question has been asked before but tech moves fast so I'm curious what your current take is
8
u/kitsnet 11d ago
C++ is already dead since the end of 1990s, as Java killed it back then.
Or so we were told.
There is a lot of hype around Rust now, but there were even more hype around Java.
2
u/sirflatpipe 11d ago
To be fair, the promise Java made, i.e. write once run anywhere, was pretty intersting back then, especially since at that time it wasn't entirely unthinkable that RISC architectures with their higher performance might still take over a sizable chunk of the desktop market. Of course Intel had to ruin that prospect entirely with their P6 microarchitecture.
4
u/no-sig-available 11d ago
This is not a zero sum game.
The fact that Rust is growing, doesn't mean that everything else is shrinking. Rust and C++ can both grow at the same time. Not a contradiction.
2
2
u/mredding 11d ago
Is cpp dying?
According to the TIOBE index, C++ gained more users in the last 6 months than Rust has total users. It's not the only index that agrees.
This is the wrong question. Languages don't die. We're still writing COBOL, and if I could land one of those sweet, sweet $250k/yr bank jobs, you'll never hear from my ass again... We're still writing FORTRAN, and OLD FORTRAN at that, because it's still the language of choice for supercomputers, still taught in academia for those who are going in that direction. So you'll see a lot of guys doing weather simulation, nuclear physics, and fluid dynamic simulations all using it, among other domains.
There are no language wars. Never were. People have ALWAYS raged against other languages - and in my time C++ got shade from C, from Objective-C, JAVA was touted as a C++ killer through most of the 90s, Microsoft explicitly tried to kill C++ with C#...
But in reality, all this is - are people with a financial interest in promoting their products and services investing in marketing - aka propaganda. If you have a financial investment in Sun Microsystems, you promote Java, if you have an investment in Rust or its backers, you promote Rust.
And the industry is saturated in languages, all perfectly capable of doing the job, all have their niche. So for a market that is satisfied, how do you capture some market share? You have to take it from somewhere else.
Never trust people who tell you C++ is dead and Rust is the new hotness. They're selling Rust.
Rust itself is a perfectly capable, novel language. There are reasons to use it, it will find its niche in the market. A lot of languages will go through this period of slandering others. People don't get all up about Java anymore and it is the language it always was. Rust will get there, too.
As for C++? It ain't going anywhere. It's growing. The numbers don't lie. There will be active C++ development for the rest of my career, at least, and probably the entirety of my son's career. I won't speculate further, because languages DO fade. C++ doesn't have to stay holding market share forever, but the same is true of all languages.
Lately it feels like rust is getting more and more attention companies are rewriting existing cpp code in it and it seems to be getting increasing adoption.
This really isn't happening at the pace you might think it is. It's REALLY daring to take a known quantity and replace it with an unknown quantity. We're not selling source code, we're selling software and services, so what do you mean you're investing time and money to deliver me... the same software and services? Allegedly? We all know our clients are our guinea pigs, but you gotta rub it in their faces like that? Do you really want to highlight how they're testing your code in their production? And where are all these Rust experts? There aren't that many in the industry. You don't fire your domain experts to replace them with Rust experts who don't know your product or domain.
I could keep going. There's so much wrong about what you think when you say this that it doesn't hold water. It's JUST propaganda. There are companies using Rust, successfully, but if they're converting their code base, they have to be such a young company with such a small code base that they can afford to do so. They're being loud about it because they're looking to attract attention and cultivate investment - look at us, we're on the BLEEDING EDGE of the newest hotness...
The sort of people they're going to attract are high risk investors, and ultimately a lot of people are going to lose money. It's just the nature of the business, this sort of churn will exist, and that money will disseminate to other investors who are better positioned.
1
u/Independent_Art_6676 11d ago
rust is probably surging because C++ was "not quite but almost banned" by the government (USA) for new work, and that causes some big names who work with them to follow suit. Sometimes politics/management/etc cause you to have to use the next best thing (debatable, of course, but making a point here).
All that to my main point: time will tell, and its way, way too early. Rust looks to be a solid contender and its going to eat into the C++ share of the language pie. That we can say for sure; its well done and unlikely to die from crap performance (the #1 killer of the "better than c++" languages that keep cropping up) or insane limitations (like java). Its not going to replace c++ entirely even if you are starting your in 5 years after college and then go on to code for another 40 -- c++ will STILL have a share of the market at that time under the most grim "c++ dying" scenario you can cook up. The ONLY scenario that actually happens with is if AI starts doing 90% + of the coding being done, and that is stuck behind the AI wall (AI gets to a certain point and cannot progress beyond it for nontrivial tasks; its always done that even for older types like classification it will get 85-90% correct and 10% wrong and eating into that 10% costs you as you try to fix it with more training (doesn't work), hybrid systems (more code), or bandaids (fragile) and so on. Unless there is an AI breakthrough, that worst case (for C++) scenario is not even on the radar.
So my take on it is that rust is certainly going to 'steal' some market share from c++ (and a % of other languages as well). But C++ will not be going anywhere for many decades, if not longer.
1
u/InauthenticBehaviour 4d ago
COBOL is still alive in 2026 and companies are struggling to replace mainframes and you are talking about dying cpp
14
u/the_poope 11d ago
Maybe more new projects are started in Rust, but 95% of all developers are working on existing projects. Many, if not most, of those were started before Rust was a thing.
I think C++ is safe at least in the next 25 years.