[Note: I will be using C and C++ interchangeably throughout.]
Discussions about Rust, Golang, Kotlin, etc replacing C++ always overlook how deeply entrenched C/CPP is in the world. Cars, cable boxes, movie projectors, fighter jets, particle colliders… heck Python uses a ton of C under the hood and the internet runs on Nodejs, written in C, running on operating systems written in C. Accessed by browsers written in C. The world runs on it.
Yeah it’s got a lot of problems but when a language is so widely deployed the problems are equally widely known. The quirks don’t surprise engineers, they build for them. The capabilities and limitations of the language are known quantities. Sure Ryan Dhal can complain about C and switch to Rust for Deno, but if you’re coding a new missile guidance system do you wanna use a new language that is theoretically better and easier to use, or the one that you’ve spent 20 years getting REALLY good at using for guiding missiles?
I predict that C/CPP will be replaced by a new language around the same time QWERTY keyboards are replaced by a new layout.
I'm not sure when that will be, but I'd love to hear from any of you who can see a practical path to what would be nothing short of a revolution in how we tell the stuff in the world what we want it to do. It seems such a long uphill fight to my eyes, but I'm open to being convinced otherwise.
[Note: This is a lightly revised repost of comment I wrote, which I wanted to publish under my profile for future reference]