Keynote: Rust in the Linux Kernel, Why? - Greg Kroah-Hartman
Posted by small_kimono@reddit | linux | View on Reddit | 13 comments
Posted by small_kimono@reddit | linux | View on Reddit | 13 comments
imoshudu@reddit
Because there's no human alive that can write code which always compiles. Humans aren't robots. We make mistakes. Let the compilers ensure standards.
hkric41six@reddit
Rust is not the only language that does that though, so this doesn't answer the question.
TRKlausss@reddit
How many times I’ve said that to colleagues and they answer with “c’mon, we are not in the aeronautical industry”, followed by a call from service and subsequent 3 hours of customer support…
astrobe@reddit
I've been writing C for 20 years and most of my customer support time was spent on logical errors, like an unexpected combo of options, not memory safety issues. Rust programs also have CVEs related to logical errors.
Telling your colleagues to use another language is unlikely to help, because they probably can't - a full rewrite for the sake of correctness rarely sells. If you can sell that, you should consider a career in politics rather than software development.
What they need is piece of advice on how to make "C more resilient" as Bonejob puts it in their comment, how to avoid mistakes with actually good practices - not superstitious practices, like I see many newbies do (they are doing things without understanding why besides its as the teacher said, which is deeply problematic).
hopeseeker48@reddit
Rust is better at expressing business logic, it is not just memory safety
Bonejob@reddit
As a C developer since the 80's, I see Rust as a step forward for dealing with lazy developers. Yes you can make C more resilient but most wont bother. Of course, this can be said of Rust, where they use a C library that is not memory-safe to access some device or other, but at least Rust enforces some rules.
small_kimono@reddit (OP)
Gosh I think C is just hard. Like GKH says there is so much to keep in your head and which the language simply doesn't help you do. Does the return null? Can this or that be returned in a possibly uninitialized state? Etc.
Exactly as GKH says Rust clears up information about the API by encoding it in the type system.
Remember the Filesystem in Rust debacle? If not see: https://www.youtube.com/watch?time_continue=2&v=WiPp9YEBV0Q&embeds_referring_euri=https%3A%2F%2Fwww.google.com%2F&source_ve_path=Mjg2NjY
The point they never let the speaker get to was -- none of this information is in your docs. Using this API is next to impossible. Rust solves that problem!
TRKlausss@reddit
That’s what K&R said about about assembly, and that’s why they made C. So it’s a great step.
Maybe in 40 years someone says “Rust is hard, du is better”…
GoldNeck7819@reddit
Yes, C is hard but that’s what makes it fun. To learn exactly how things work and make them work correctly. I find it very fun. Imagine the days of writing assembly!
proton_badger@reddit
Yeah, I've worked C and C++ since the nineties. Humans are fallible no matter how experienced and no matter how hard we try to do it right. Computers exist to manage and keep track of things, let them do that when developing too..
Userwerd@reddit
Ive received some negative reception here regarding GPL. As long as linux and GNU both remain GPL, are not rewritten in rust and released under a permissive lisence I'm fine with rust as progress.
proton_badger@reddit
Rust in the the Linux kernel is GPL. But we have always had lots of permissive projects in Linux as a whole, like Mesa, X11, orig sudo, OpenSSL, Python, etc. etc. So the license is kind of a different conversation not really about the language but a project choice.
Business_Reindeer910@reddit
it is true that some people don't realize how much important stuff was already under a permissive license when this conversation comes up.