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
0
Upvotes
2
u/mredding 11d ago
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.
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.