logoalt Hacker News

zarzavat • today at 11:00 AM • 4 replies • view on HN

C++ is dying. The only thing keeping it going pre-AI was the large number of experienced C++ developers who had invested decades into learning the language, and I say this as one of those people.

AI makes it easier to write new code in Rust, easier to rewrite old code from C++, and easier to exploit C++ code.

There's no way back for the language, inertia will carry it for the next 10+ years but its eventual irrelevance is a certainty.


Replies

fwsgonzo • today at 11:08 AM

Indeed. I've converted one of my projects to Rust via LLMs and it was completely painless and ~same performance. LLMs found a swathe of issues that I ended up porting back as well. I still maintain the C++ library, but it's mostly for my own and existing usages now. I think newer projects will be looking for the Rust crate. I've also noticed that LLMs are doing better with Rust overall: Building, testing, formatting, linting and publishing is all standardized. As it should be.

LLMs are quite good at hand-written assembly though, so my C++ library still has a large lead for platforms where that work is done. I can probably port that to Rust as well, but I did start out with forbid(unsafe).

➕ show 1 reply
ChrisRR • today at 11:44 AM

I can't see it going anywhere soon. The amount of existing projects in C++ still need developers

➕ show 3 replies
jibalt • today at 11:21 AM

You seem to have missed a few things in TFA, as well as the amount of deployed C++ code and the number of installations, not just developer count (which is also massive).

gambiting • today at 11:06 AM

It's still the most popular language for writing video games in, and it's an industry larger than films. C++ isn't going anywhere, unless Sony/Nintendo/Microsoft somehow provide SDKs for anything other than C++. But they can't even provide non-windows compilers for their toolchains, so I won't hold my breath.

➕ show 2 replies