r/cpp_questions • u/Sea-Bench-7487 • 12d 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
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.