Sign in Join now Linus Torvalds says yes to Rust after 30 years of saying no to C++ This title was summarized by AI from the post below. View profile for Altug Tatlisu Altug Tatlisu 1mo
Linus Torvalds spent 30 years saying no to every language that wasn't C.
He called C++ a horrible language. Said keeping C++ programmers out was itself a reason to use C. When someone suggested C++ as an alternative to Rust, he replied with one word: LOL.
Then he said yes to Rust.
Not because he went soft. Not because the community pressured him. Because Rust solved the actual problem. Hidden memory allocations behind your back, exception handling you can't reason about, abstractions that look clean until they don't. These were his exact complaints about C++. Rust doesn't have them.
The most opinionated gatekeeper in open source history looked at Rust and couldn't find his usual argument.
That is not a small thing. 136 43 Comments Like Comment Andrii Sevastianov, graphic Andrii Sevastianov 1mo
Don't fall for the hype. Rust is not actually used in the Linux Kernel. Try compiling the Linux Kernel without Rust completely and see what you lose. I did it, and I had to disable the "very important" panic screen QR code driver, plus Nova Core and Nova DRM. This is an unwritten Nova driver for nVidia that just compiles and takes up space. It's a few years away from release, if it doesn't die along the way... Besides, all the complex logic is implemented in the video card itself. It's just an adapter. This isn't Nouveau, which has to support old video cards.
Actually, you can write drivers in C++, Ada, or Pascal. There is absolutely no problem with how you create a .ko file. I've seen it done, the only issue is porting the headers, which is barely a problem for C++. But you can't write in Rust except in unsafe, so they needed a massive wrapper that took 5 years to write.
They finished it, and now you can write drivers in Rust, but we are talking about highly isolated drivers. The community is cheering, but it's too early to draw conclusions about the benefits. It sits on the side, doesn't get in the way, and that's exactly why Linus agreed. It doesn't prevent others from working without Rust in any way, and it won't replace C. Like Reply 13 Reactions Tomas Prerovsky, graphic Tomas Prerovsky 1mo
Wow, that's authoritarianism writ large. A discussion should be based on facts, and facts only, not credentials. To hide behind a well known soon-to-be-retiree is the weakest argument possible. Like Reply 3 Reactions Thomas Voss, graphic Thomas Voss 1mo
Rust does hidden allocations behind your back literally all the time. At what point did the signature of Box::new() tell me it was allocating memory? Unlike in C, the documentation for said functions often times don’t even tell you allocation is happening Like Reply 5 Reactions Brandon Harrell, graphic Brandon Harrell 1mo
Rust does have hidden allocations. You seem to be confusing it with Zig (which entire design is based around no hidden control flow) Like Reply 2 Reactions Danny Meijer, graphic Danny Meijer 1mo
Exactly. Rust is not “C++ but safer.” It made a different set of tradeoffs, and that is why it earned a place in conversations where almost every other language gets laughed out of the room.
Rust has no hidden GC, no exceptions as control flow, no casual memory unsafety in ordinary code, no pretending resource ownership is someone else’s problem. The compiler is strict because the domain is strict. And the (really) fun part is: once you accept Rust as the safety/performance/ecosystem layer, you can start asking what should sit above it.
That is where I think Incan gets interesting: Python-shaped source, Rust underneath, rustc as the final safety check, and the compiler doing more of the ownership planning.
Tongue only slightly in cheek: if we get that authoring layer right, maybe one day we don’t need to choose between Python for readability, JS/TS for reach, and Rust for production confidence quite so often... we'd just do it all in Rust + Incan. One day, hopefully soon ;)
incan.io Like Reply 2 Reactions Marko Poutiainen, graphic Marko Poutiainen 1mo
Actually one big reason he said in an interview was the he had to consider the future of Linux kernel maintenance. Core group is getting old, Linus included and he has to consider what comes after that. Number of proficient C coders will inevitably decline over the next few decades. Like Reply 2 Reactions Justin Handville, graphic Justin Handville 4w
Actually, he was pressured. Rust in Linux wasn’t a whim. It was a concerted effort by a community of Rust enthusiasts. His decision to support it wasn’t necessarily because of its safety claims, as dubious as they are in an operating system kernel where deadlocks and memory leaks are critical.
His decision was based largely on the fact that many of the volunteer contributors are greying out. If Rust attracts new talent, as far as he’s concerned, that’s a good thing. I suspect that this reasoning, in particular, is what sold this more than anything else. Like Reply Taimuraz F., graphic Taimuraz F. 1mo
Well, Rust is a programming language 😁 C++ originally was a text transformer to C. It still doesn't look like a self-complete language no matter how hard C++ programmers try Like Reply 1 Reaction Joe Schaefer, graphic Joe Schaefer 1mo
LOL. That's because Rust is popular in F/OSS, and Linus can't run the show forever all by himself. The great thing about Rust is that backwards-compatibility never mattered less, so now nobody will be able to compile custom kernel mods. Great Value.