Why Rust Isn't Killing C++ (2024)

I can’t see a post about Rust or C++ without comments about Rust replacing C++. I’ve worked in Rust as a cybersecurity intern at Microsoft and I really enjoyed it. I’ve also worked extensively in C++ in both research applications and currently in my role as a machine learning engineer at Google. There is a ton of overlap in applications between the two languages, but C++ isn’t going anywhere anytime soon.

This is important to understand because the internet likes to perpetuate the myth that C++ is a soon-to-be-dead language. I’ve seen many people say not to learn C++ because Rust can do basically everything C++ can do but is much easier to work with and almost guaranteed to be memory safe. This narrative is especially harmful for new developers who focus primarily on what languages they should gain experience in. This causes them to write off C++ which I think is a huge mistake because it’s actually one of the best languages for new developers to learn.

C++ is going to be around for a long time. Rust may overtake it in popularity eventually, but it won’t be anytime soon. Most people say this is because developers don’t want to/can’t take the time to learn a new language (this is abhorrently untrue) or Rust isn’t as capable as C++ (also untrue for the vast majority of applications). In reality, there’s a simple reason Rust won’t overtake C++ anytime soon: the developer talent pool.

Most applications that use C++ are latency and efficiency critical. In my experience, this criticality is responsible for the profitability of the application. Two examples where C++ is frequently used are machine learning and high-frequency trading applications. Both require efficient, low-latency execution to achieve a profit.

You might think: So what? Rust can be used here too. And it absolutely can be. But the developer talent pool for C++ is much larger than Rust. Companies utilizing C++ are the same companies that tend toward a higher hiring bar because they need knowledgeable developers that are able to be productive quickly. A larger hiring pool is a great aid in this effort. Choosing C++ over Rust makes sense just to have a larger pool of potential employees to pick from. Sure, a company can hire C++ developers and teach them Rust, but that’s a hit on developer velocity which these companies need to avoid.

I bring this up because the “Rust has killed C++” narrative can have a very negative impact on individual software developers. C++ is one of the best languages for new developers to learn for two primary reasons:

  • It forces an understanding of fundamentals. Fundamentals are important to learn and they lay the groundwork for a developer to learn other languages. Going from C++ to another language is easy but the other way can be a bit more difficult. I’d like to emphasize here that part of the job of a software engineer is to be able to pick up languages required for the problem they’re trying to solve. C++ is helpful for learning this skill.

  • C++ is incredibly lucrative. The roles looking for excellent developers to tackle latency-critical problems tend to pay well. As a new developer, learning C++ puts you in a great position for a lucrative career.

I recommend dabbling in C++. Even though I’d like to program in Rust because it's very enjoyable, there’s a ton of friction for new language adoption especially in profit-critical applications. C++ isn’t going anywhere anytime soon.

Why Rust Isn't Killing C++ (2024)

FAQs

Why Rust Isn't Killing C++? ›

Most people say this is because developers don't want to/can't take the time to learn a new language (this is abhorrently untrue) or Rust isn't as capable as C++ (also untrue for the vast majority of applications). In reality, there's a simple reason Rust won't overtake C++ anytime soon: the developer talent pool."

Will Rust really replace C++? ›

Rust and C++ are totally different and unrelated languages that are used for totally different and unrelated tasks. They are both great languages, really great. Neither one of them will die every time soon. Rust is not a successor or a replacement for C++.

Is Rust a C++ killer? ›

Rust's generics are uglier and way more verbose than C++ templates for numeric code. Rust has better aliasing guarantees and nicer multi-threading, but I guess that's something OP is willing to manually deal with in C++. Most of them, for instance, Rust, Julia, and Cland even share the same backend.

Can C++ compete with Rust? ›

Ultimately, the choice between Rust and C++ depends on your specific project requirements. If you prioritize safety, developer experience, and modern programming concepts, Rust is a strong contender. However, for raw performance, large existing codebases, and established libraries, C++ remains the dominant force.

Should I learn Rust if I already know C++? ›

While developers are mainly creating, for instance, games with C++, Rust has the potential to take over this sphere once it gets settled. Therefore, if the lack of tools and frameworks does not scare you off, you should definitely try learning Rust, especially if you already know C++.

Should I learn Rust or C++ 2024? ›

If you are looking for a well-supported and framework-rich language, you will probably choose C++. In other cases, you might want your code to be extremely safe, avoid memory leaks and other undefined behavior then start learning Rust. It is said that Rust still lacks tools and frameworks.

Why will Rust never replace C? ›

The code ends up quite laborious, and it's just not suitable for many things, and it doesn't play so easily with C. Most projects do not require what Rust provides at the cost it provides it at.

Will Python be written in Rust? ›

RustPython is a Python interpreter written in Rust. RustPython can be embedded into Rust programs to use Python as a scripting language for your application, or it can be compiled to WebAssembly in order to run Python in the browser. RustPython is free and open-source under the MIT license. Hello World!

Does Rust compile slower than C++? ›

For incremental builds, Rust will take longer to compile than C++ (i.e. C++ wins). This is because Rust compiles one crate at a time, rather than one file at a time like in C++, so Rust has to look at more code after each small change.

Can Rust do everything C can do? ›

In theory, Rust allows even better optimizations than C thanks to stricter immutability and aliasing rules, but in practice this doesn't happen yet. Optimizations beyond what C does are a work-in-progress in LLVM, so Rust still hasn't reached its full potential.

Which is harder, C++ or Rust? ›

Is Rust easier than C++ to learn? Rust is widely considered easier to learn than C++.

Why is C still better than Rust? ›

On the other hand, Rust has a much more complex syntax, with many unique features that can be difficult for programmers to master. This complexity makes Rust more prone to errors and difficult to debug. C also offers greater control over memory management, which is critical in systems programming.

Is Rust more memory safe than C++? ›

Rust offers exceptional defaults and strict memory safety. It truly is an excellent programming language, but it also has a tough learning curve as concepts like borrow-checker might be an alien concept to C++ veterans.

Is Rust better than C++ for new projects? ›

Although Rust is easier to use, C++ has a larger community with all the extensive libraries needed to create safe code. While Rust is still developing, C++ once went this way. If you're interested in which language to learn or choose for your project – the answer depends on your needs.

Is C++ going to be replaced? ›

“replaced” not that C++ will no longer be useful, but in terms of relevance. It will still be there, but you may not see the need when you can use efficiently use Carbon. This is not going to happen tomorrow or next. C++ will still be relevant in the next decade.

Does Rust have any future? ›

Rust also has some plus points when it comes to building ML and AI applications that deal with complex data structures or do efficient memory management. In the Future There Will Be More Libraries And Toolkits Utilized For Rust That Are Intended For Scientific Computation Or Deep Learning Computation.

Will Rust replace C in embedded systems? ›

Rust is particularly a game changer for modern embedded applications with RTOS where safety and concurrency matters. It will not replace the legacy resource-constrained systems designed on C to do the bare-minimum embedded stuff (yes, Rust is not coming to 8086).

Top Articles
Equal Credit Opportunity Act
Liquids Solids and Gases
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Dmv In Anoka
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Umn Biology
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Neely Ledner

Last Updated:

Views: 6284

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Neely Ledner

Birthday: 1998-06-09

Address: 443 Barrows Terrace, New Jodyberg, CO 57462-5329

Phone: +2433516856029

Job: Central Legal Facilitator

Hobby: Backpacking, Jogging, Magic, Driving, Macrame, Embroidery, Foraging

Introduction: My name is Neely Ledner, I am a bright, determined, beautiful, adventurous, adventurous, spotless, calm person who loves writing and wants to share my knowledge and understanding with you.