safe 'subset'
>>>
https://lkml.org/lkml/2021/4/14/1023
Why Rust?
Rust is a systems programming language that brings several key advantages over C in the context of the Linux kernel:
- No undefined behavior in the safe subset (when unsafe code is sound), including memory safety and the absence of data races.
<<<
'Safe subset' is what this is all about.
>At the same time, Ojeda insisted, if you program with Rust well, you "can generate code as good and fast as C or C++."
Yea, of course you can. But in his insistance, he conveniently leaves out safety.
I can write safe and portable system code in C. But it's slower than platform-optimised code, which may well produce undefined behaviour if compiled for the wrong platform.
There's an unavoidable conflict between speed (efficiency) and safety. At the system level, speed counts. If there's ever a speed issue in Rust (and there will be), what will happen? Turn off the safety + call some C. So it doesn't help.
What helps is 'programming well', running lots of tools, and testing.
For applications, fine, bring on Rust or whatever.