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
How to Find a Profitable Ecommerce Niche (& Start Selling)
Don't Get Lost Without Internet: Download Google Maps Offline
Exclusive: Baby Alien Fan Bus Leaked - Get the Inside Scoop! - Nick Lachey
Cooking Chutney | Ask Nigella.com
Directions To Franklin Mills Mall
Affidea ExpressCare - Affidea Ireland
Nesb Routing Number
Paula Deen Italian Cream Cake
Mylife Cvs Login
Detroit Lions 50 50
Dusk
Industry Talk: Im Gespräch mit den Machern von Magicseaweed
Mini Handy 2024: Die besten Mini Smartphones | Purdroid.de
Otterbrook Goldens
National Office Liquidators Llc
Abortion Bans Have Delayed Emergency Medical Care. In Georgia, Experts Say This Mother’s Death Was Preventable.
Georgia Vehicle Registration Fees Calculator
DBZ Dokkan Battle Full-Power Tier List [All Cards Ranked]
Exterior insulation details for a laminated timber gothic arch cabin - GreenBuildingAdvisor
Kaitlyn Katsaros Forum
Johnnie Walker Double Black Costco
Panola County Busted Newspaper
6 Most Trusted Pheromone perfumes of 2024 for Winning Over Women
Bocca Richboro
Is Henry Dicarlo Leaving Ktla
Biografie - Geertjan Lassche
The Goonies Showtimes Near Marcus Rosemount Cinema
Healthy Kaiserpermanente Org Sign On
Tracking every 2024 Trade Deadline deal
Uncovering the Enigmatic Trish Stratus: From Net Worth to Personal Life
Fairwinds Shred Fest 2023
How To Make Infinity On Calculator
Shaman's Path Puzzle
Dreammarriage.com Login
Skip The Games Ventura
Vanessa West Tripod Jeffrey Dahmer
Stafford Rotoworld
Cookie Clicker The Advanced Method
B.C. lightkeepers' jobs in jeopardy as coast guard plans to automate 2 stations
Easy Pigs in a Blanket Recipe - Emmandi's Kitchen
Lake Kingdom Moon 31
Man Stuff Idaho
Postgraduate | Student Recruitment
Kb Home The Overlook At Medio Creek
814-747-6702
Ups Authorized Shipping Provider Price Photos
Bmp 202 Blue Round Pill
The Sports Academy - 101 Glenwest Drive, Glen Carbon, Illinois 62034 - Guide
877-552-2666
DL381 Delta Air Lines Estado de vuelo Hoy y Historial 2024 | Trip.com
New Zero Turn Mowers For Sale Near Me
Ronnie Mcnu*t Uncensored
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.