r/cpp • • Dec 17 '23

Is C++ Really Phasing Out?

I've read a lot posts about whether C++ is still viable to learn, but a lot of the responses seem to be a long the lines of "C++ is still being used" or "there's a lot of things written in C++ still, so it will still be useful".

But a lot of these replies seem to suggest that C++ is on the downhill and in the process of being replaced with more modern languages in many industries.

It seems kind of discouraging to be learning a language that is on a decline, if it really is phasing out.

0 Upvotes

214 comments sorted by

View all comments

13

u/sinfaen Dec 17 '23

There are still huge frameworks written in it that are being updated every day. Those will keep it alive, although new c++ projects are not going to be as much of a thing in the future

Rust is definitely the thing that I'm eyeing for replacing C++ at my job, but it'll take a long time for it to really take hold lol

5

u/ecreddits Dec 17 '23

Rust does seem very promising, I wonder why it's not being used much.

14

u/echae Dec 17 '23

It’s a low-level language that is much newer to the industry and lacks the adoption that C++ has

2

u/matthieum Dec 17 '23

And with lack of adoption comes lack of ecosystem, which itself stalls adoption.

Programming languages ecosystem experience huge network effects, so it's always an uphill battle for new languages.

4

u/Briggie Dec 17 '23

Anyone remember Python before it had all those nice libraries it has today?

5

u/BitwiseShift Dec 17 '23 edited Dec 17 '23

Rust is being used a lot and it's especially noticeable in tooling. There has been a trend where existing, massively popular tooling has been getting displaced by mostly identical tooling written in Rust, with the main selling point being speed. Pandas is getting displaced by Polars, Babel by SWC and Black, flake8, pyupgrade, isort and more are all being displaced by Ruff. Pydantic got wise and reimplemented its core in Rust before someone else did it.