Rust support hits linux-next
Rust support hits linux-next
Posted Apr 27, 2021 14:25 UTC (Tue) by nix (subscriber, #2304)In reply to: Rust support hits linux-next by Wol
Parent article: Rust support hits linux-next
That's a fairly ridiculous characterization. By any standard, Rust is much higher-level than C: you name it, language-wise it has way more advanced features and permits a higher level of abstraction than C does. What it also has is more consistency (fewer implementation-defined edge cases).
Posted Apr 27, 2021 16:21 UTC (Tue)
by Wol (subscriber, #4433)
[Link] (1 responses)
I've come to the conclusion that a good low-level language "does not give the compiler much opportunity to optimise well-written code". It seems most problems with C (for the kernel at least) are caused by the compiler optimising the hell out of it.
So long as high-level constructs map cleanly to the obvious underlying machine/assembler code, I'd call that a "good low-level language".
Cheers,
Posted Apr 27, 2021 17:01 UTC (Tue)
by mathstuf (subscriber, #69389)
[Link]
That said, I don't know Rust's guarantees around reordering statements, but given the more explicit "I'm using a single variable across threads" model, there are likely a lot fewer ways the compiler can think to order things (barring bugs in the compiler, but that's C's problem too).
Rust support hits linux-next
Wol
Rust support hits linux-next