Comment on Linux royalty backs adoption of Rust for kernel code
Buffalox@lemmy.world 16 hours ago
That does NOT sound like a good idea.
We’ve turned our development model into a well-oiled engineering marvel,
Exactly, and I’m pretty sure one of the reasons is that it’s remained on C, and NOT switched to C++, as has been often suggested.
The second they make it a mixed code base, that’s the same second quality will deteriorate.
WalnutLum@lemmy.ml 3 hours ago
darklamer@lemmy.dbzer0.com 13 hours ago
The second they make it a mixed code base, that’s the same second quality will deteriorate.
I envy your confidence!
Buffalox@lemmy.world 5 hours ago
Maybe I’m wrong, but as I read the article, Linus isn’t convinced this is a good idea either.
I’m not saying things can never change, but opening for a mixed code base is a recipe for disaster.gedhrel@lemmy.world 4 hours ago
You’re wrong, but it’s possible the article gave you that impression. Read the mailing-list thread.
It’s particularly worth reading Ted T’so’s contribution, which (considering his rude behaviour at the recent con led to a previous round of this nonsense) seems much more positive.
farcaster@lemmy.world 16 hours ago
Moving from C to C++ would also not solve any real problem. C++ of course adds OOP which I think can be nice (not everyone agrees with this!) but it also adds an insane amount of language complexity and instability. Mentally reasoning about C code is hard, reasoning about C++ code is nearly impossible.
Rust however brings a novel solution to classes of problems like ownership and mutability with the borrow checker. It’s now accepted to be a great tool for writing high performance code while preventing a substantial amount of common, but often subtle, bugs from slipping through. It’s not arbitrarily the first non-C code to be accepted in the kernel. And it’s used in other operating systems like Android and Windows already.
sugar_in_your_tea@sh.itjust.works 15 hours ago
In general, for me, Rust > C > C++.
I’ve heard people say that C is like a loaded and cocked revolved, and if you’re not careful, you could blow your foot off, whereas C++ is like a loaded and cocked sawed-off shotgun, and if you’re not careful, you could blow your leg off.
FarceOfWill@infosec.pub 5 hours ago
C++ is a semi automatic shotgun with 200 barrels point in all directions.
gedhrel@lemmy.world 1 hour ago
Whilst it’s gotten a lot better in the -17 and -20 iterations, the fact that there was recently a doorstop book published solely on the subject of C++ initialisation semantics is pretty telling.
I really like what Herb Sutter’s doing around cppfront; I still wouldn’t use C++ unless I absolutely had to.
brucethemoose@lemmy.world 16 hours ago
Mostly this ^.
There’s just not really demand for C++ in the kernel; that’s not the case with Rust.
mesamunefire@lemmy.world 16 hours ago
I think it would also bring in more developers. So more changes would eventually make its way into the kernel.