3 ms·
I enjoy how defensive Rust fans are over their language, it's fun to poke at in my spare time. First of all, Rust is a great language with great ideas in my opi
by jbirer 4y ago
I enjoy how defensive Rust fans are over their language, it's fun to poke at in my spare time. First of all, Rust is a great language with great ideas in my opinion, but not really fit for systems programming unless you mean on top of an OS like cd grep etc. I think most Rust fans have never written an embedded project or dabbled in lower level code so they assume that it's just perfect for low level.
First you have to work around things like direct memory access, writing a "safe" wrapper around direct memory access doesn't really take it from unsafe to safe and you have to fight the language to do the things you have to do when doing kernel work. Then you have to deal with badly optimized output of the compiler which is fine in an user space program but a no-go in a kernel or even worse on embedded. I know some might say "well you aren't supposed to do that, you need X safety measure" but the hardware doesn't work like that, if you try to apply those concepts to out-of-order execution for example you will incur a heavy performance cost.
tl;dr Rust fanboys should read some kernel device driver code and lower level code before giving their input
- pjmlp 4y agoSomehow Google has managed to ship drivers written in Rust since Android 12. I explicitly mentioned Safe Systems Language XVYZ, because the defensive reaction is to complain about Rust, as if systems programming languages safer than C didn't exist since 1958, with JOVIAL being one of the earliest ones worthy of mention.
- forgotpwd16 4y ago>but not really fit for systems programming Ironically you say this on a submitted project that uses Rust for systems programming.