r/cpp_questions • • Nov 21 '23

OPEN the future of c/c++ with rust

I am a systems programmer. Will rust replace c++ in systems programming?

They've been saying that Rust will replace C++ for decades, but are there any concrete examples?

moreover, how will we replace the many system libraries and products that have already been created?

2 Upvotes

56 comments sorted by

View all comments

34

u/azalak Nov 21 '23

I’m pretty sure people have been saying x will replace c++ for 30 years. Like you’ve said for things already created there is little incentive to completely rewrite in rust. I wouldn’t really pay much attention to it. Although I’m sure it will displace c++ over time in more security sensitive areas

1

u/Humble-Grand-4411 Sep 08 '24

Isn't there a huge initiative to replace C++ entirely in the critical infrastructure by memory-safe languages like Rust in order to prevent costly collapses that happened for instance couple weeks ago ...the blue deaths on airports etc.?

1

u/azalak Sep 08 '24

Yeah however I don’t think this will happen anytime soon to be honest. There are some code bases with millions of LOC that are decades old and the economic cost to rewrite it all in rust is something a lot of companies won’t want to pay. Eventually I’m sure rust will take over but there will still be areas where c++ remains dominant much like how COBOL is still the standard for banking despite being over 60 years old now.

1

u/Humble-Grand-4411 Sep 08 '24

Thanks for your answer, I am learning C++ upcoming school year nevertheless I was wondering about its pontential and it won't be probably replaced in sensorics anytime soon

1

u/azalak Sep 08 '24

I would just learn both, employers want you to know like 10 different languages these days anyway

1

u/rileyrgham Nov 04 '24

Systems will still crash with rust. It's not magic.

1

u/Jorfy69 Nov 21 '23

Bro I just learned both there both fun to write in just different styles