Rust Will Replace C++? Doctor Diagnoses Programming Language Hype Disorder
Description
Two - panel sitcom screenshot meme. Panel 1: a nurse in blue scrubs faces a patient off-screen and asks in yellow caption text, “Do you have any history of mental illness in your family?”. Panel 2: the camera shows the patient in a hospital gown replying with another yellow caption, “I have a brother who believes "Rust" will completely replace C and C++ in future.” Faces are blurred, room decor is neutral hospital colors, and the creator watermark “yuva.krishna.memes” appears on the right. The joke equates over-optimistic claims about the Rust programming language supplanting decades-entrenched C/C++ code to a medical concern, poking fun at language wars, adoption hype, and the reality of legacy ecosystems
Comments
28Comment deleted
Rust will replace C++ the same quarter management signs off on rewriting the 3-million-line C++98 engine that settles a trillion dollars a day - right after “migrate the mainframe to Kubernetes” on the roadmap
After 20 years of watching language evangelists promise to replace C, we've learned the only thing that truly replaces C is... more C, just with different undefined behavior and a new committee arguing about whether nullptr should have been null_ptr
The real family history here is decades of C programmers insisting 'if it ain't broke, don't rewrite it in a memory-safe language' while simultaneously debugging their 47th segfault this week. Meanwhile, the Rust evangelists are out there like missionaries, armed with borrow checker testimonials and zero-cost abstraction pamphlets, convinced they can save everyone from undefined behavior - one reluctant systems programmer at a time. The truth? Both languages will outlive us all, because legacy codebases are the true immortals of software engineering
Rust is fantastic, but replacing C/C++ means convincing every kernel ABI, vendor SDK, and real-time firmware to cross the FFI without a single unsafe block - great aspiration, terrible migration plan
Rust will replace C/C++ the day vendors stop shipping SDKs as a zip of .h files and a mystery .so; until then we’re just wrapping unsafe extern 'C'
Rust replacing C/C++? Adorable - until the pager wakes you at 3AM because unsafe escaped anyway
If it wasnt for personal preference I think it would. Comment deleted
We still use old stuff. I believe before everything switches to rust there will be 2 more replacements that will try replacing rust. Comment deleted
Not quite. I met some guys doing really low level stuff and they explained to me why rust will never replace c++. At really low level, sometimes you need to break conventions and safety to get those additional 2ms out of it. He cited me an example where he had an arena allocation and he knew that the thing he needs is located 2 bytes to the left of this other pointer. So he just *(ptr-2) which is unsafe but faster than saving that pointer somewhere. On that same note, Rust performs a boundary check when you acces a vec item by index - that's additional clock cycles and they add up at his level. So he uses C++ because it lets him to whatever he has to do, pretty much. Comment deleted
You can have unsafe Rust code, additionally, as is the case with security features in C++, I'm sure you can disable the boundary check on a vec, or just write a vec implementation yourself. Comment deleted
Sure, but at that point 90% of your code is going to have to be marked as unsafe. In which case, why did you even use Rust in the first place? Comment deleted
You wouldn't mark all of your code as unsafe. Only the specific sections where you use unsafe operations. I do occasionally write C++ code for embedded hardware where performance and memory usage is critical, and while yes, there is a fair amount of unsafe code, the vast majority of it isnt. I dont think that rust is going to replace C++, but for the most part I think in many cases it could, or should. Comment deleted
I'm a backend guy myself and in most cases Go or Rust do the job for me. I don't remember ever having to go down to C level. Just passing on the things they told me. Maybe he's wrong, maybe he's right - a second perspective doesn't hurt :) Comment deleted
I'm not saying that he's wrong, I just think he's missing the bigger picture. The nice thing about rust, is that if you need part of the code to be written and compiled as ANSI C, you can have that. And have it operate seamlessly with the rest of your program. Safe or not. Comment deleted
Backend tasks are usually associated with languages like PHP, Python, and JS. Enterprises tend to prefer C# and Java. For heavy calculations, F77, Java, and Python are often used, largely due to their extensive set of libraries. Rust is an extremely niche language, similar to Scala, Ruby, and Go. In my humble opinion, the only reason to use Rust is to delve into C-level programming, in order to achieve the speed of C while maintaining the safety that is typically provided only by high-level languages. But you don't "go down to C level". So, why do you use Rust? Comment deleted
because it's a modern language with modern features, a really nice LSP and a REALLY nice dependency manager Comment deleted
So, is it just enthusiasm about a new language, not related to any real tasks? Comment deleted
modern language → more good features, less legacy not hype-related Comment deleted
Also, there are more bugs, a lack of libraries, poor documentation, and changes without backward compatibility. In most cases, it's potentially a dead language with nearly zero chances of finding a job in it in 5 years. I don't mind. Just curious. Comment deleted
poor documentation? lmao you never used rust, did you? Comment deleted
I checked the documentation. It's just a mix of code with occasional comments without common style. To be honest, it's worse than CPAN, which I usually refer to as a dump of garbage. Comment deleted
Choosing a programming language is always a game of pros and cons. And Rust has some pros over the more established frameworks. For example, it's fast, reliable and well documented. It's hard to make bad code in Rust, and you get full support from the LSP and the compiler, while not having the same complexity as C or C++, for about the same speed. Also, you can work with async code without giving yourself headaches most of the time, and that's a big plus Besides that, you can see a lot of articles both praising and criticizing Rust, it's not hard to find them. So you can have a better opnion about how it works and why it's so well loved. Comment deleted
In many backend scenarios, the performance bottlenecks are often I/O-bound, such as database access or external API calls, rather than CPU-bound. That's why Python, PHP, and JS/TS are so popular, despite their poor performance and resource usage from certain perspectives. I'd prefer mainstream languages over niche ones, but that's because I like to see tangible results and financial gain. Pioneering hasn't been my kind of fun for at least the last 25 years of my work experience. Nonetheless, I appreciate enthusiasm because occasionally it yields good tools for everyone. Comment deleted
I agree these are the commom bottlenecks. Yet, many have migrated entire backends to Rust or Go, not because of niche or hype, but because they're more efficient at that. Go has a bit of a problem with GC, yet it's more reliable than Javascript for a server, for example. And by the way, Rust isn't niche anymore, not even close to that. It's used by big and small techs. You can see that by going to crates.io; there's a big ecosystem with lots and lots of packages and weekly downloads. Even some Javascript CLI tools are being re/written in Rust Also, it's not new. Rust is more than 10 years old, with it's 1.0 released back in 2015. Comment deleted
So at the last company I worked for, our codebase was mainly Go microservices running on k8s. And they did their job just fine. There were a couple of microservices tho, where we either wanted to be 100% sure that it stays online no matter what and does things fast(er). Another time we used Rust was for its type system. We had to parse something and Enums were very helpful. Generally the decision to use Rust was due to the fact that we were familiar with it and knew its pros and cons. Also, as a sidenote, Go isn't that "niche" anymore. It's grown A LOT. Comment deleted
They do write some components that are mission critical in Rust to ensure memory safety and all that. But they can't afford the cost everywhere Comment deleted
Rust is not a suitable replacement for C, as the two languages have different goals and trade-offs. While C prioritizes performance and control over the hardware, Rust prioritizes safety and memory management. Therefore, Rust should not be seen as a C replacement, but rather as a complementary language that can enhance C code with additional safety measures. Comment deleted
exactly. Rust isn't replacing C for the same reason C++ isn't replacing C Comment deleted