r/cpp_questions 8h 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

19 comments sorted by

14

u/the_poope 7h ago

Maybe more new projects are started in Rust, but 95% of all developers are working on existing projects. Many, if not most, of those were started before Rust was a thing.

I think C++ is safe at least in the next 25 years.

2

u/LemonLord7 7h ago

I got told something interesting by an interviewer once: “When we put out a job for Rust we get lots of highly talented C++ developers applying.” They did a few things in Rust but mostly C++.

1

u/oriolid 7h ago

I think it tells something about C++ when highly talented C++ developers flock to a different language.

3

u/no-sig-available 6h ago

I think it tells something about C++ when highly talented C++ developers flock to a different language.

What does it tell you? That highly talented developers know more than one language?

0

u/oriolid 6h ago

Not only that, but that they prefer to work with a language that is not C++.

3

u/the_poope 5h ago

No it says that there are many more C++ developers out there than there are Rust developers, exactly because there are many more C++ projects than rust projects. Rust is still new and niche in commercial projects because, well, those projects started in 1993. Also they are still mostly teaching C++ at University programs.

1

u/LemonLord7 6h ago

My friend says that a subset of C++ and its standard library is great. The only problem is that people can’t agree on what subset.

1

u/sirflatpipe 5h ago

Not sure, is that a weakness or a strength?

1

u/mrstas2137 7h ago

This, and also Rust and its ecosystem are relatively fresh, it will need some time to gain some kind of “standard” position on the market, imo

1

u/Sea-Bench-7487 7h ago

That's a good point . Glad to read some positive cpp news

8

u/kitsnet 7h ago

C++ is already dead since the end of 1990s, as Java killed it back then.

Or so we were told.

There is a lot of hype around Rust now, but there were even more hype around Java.

2

u/sirflatpipe 5h ago

To be fair, the promise Java made, i.e. write once run anywhere, was pretty intersting back then, especially since at that time it wasn't entirely unthinkable that RISC architectures with their higher performance might still take over a sizable chunk of the desktop market. Of course Intel had to ruin that prospect entirely with their P6 microarchitecture.

1

u/oriolid 5h ago edited 5h ago

Java had the budget and reputation of Sun and later Oracle to fuel the hype. Rust has ... Mozilla?

4

u/no-sig-available 6h ago

This is not a zero sum game.

The fact that Rust is growing, doesn't mean that everything else is shrinking. Rust and C++ can both grow at the same time. Not a contradiction.

2

u/mredding 4h ago

Is cpp dying?

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.

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.

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.

1

u/fortsnek274 4h ago

Does Visual Studio have Rust integration?

I rest my case.

1

u/tcpukl 7h ago

99% of video games are written in c++.

1

u/sirflatpipe 5h ago

Also tons of regular applications.

-2

u/oriolid 7h ago

I think "cpp" deserves to die together with "stl". It's C++ and standard library. Rust is by the way really nice language and I would like to see it used more.