HaraldvonBlauzahn@feddit.org to Linux@lemmy.mlEnglish · 4 days ago'Rust makes coding fun again': Why Linux is moving away from C, according to Greg Kroah-Hartmanwww.zdnet.comexternal-linkmessage-square90fedilinkarrow-up1171arrow-down17cross-posted to: [email protected][email protected][email protected]
arrow-up1164arrow-down1external-link'Rust makes coding fun again': Why Linux is moving away from C, according to Greg Kroah-Hartmanwww.zdnet.comHaraldvonBlauzahn@feddit.org to Linux@lemmy.mlEnglish · 4 days agomessage-square90fedilinkcross-posted to: [email protected][email protected][email protected]
minus-squarefruitcantfly@programming.devlinkfedilinkarrow-up2·edit-23 days ago Rust has no Undefined Behaviour. That is simply not true. See here for a list of behavior that is considered undefined in Rust: https://doc.rust-lang.org/reference/behavior-considered-undefined.html However, most (all?) of these require the use of unsafe, which helps narrow down where the problem might be, if you trigger any of this behavior
minus-squareHaraldvonBlauzahn@feddit.orgOPlinkfedilinkarrow-up3·edit-23 days ago That is simply not true. Yeah that is correct. I was thinking in Safe Rust alone, and actually forgot about Unsafe Rust. Because I have so far almost never used Unsafe Rust, except for C library bindings.
That is simply not true. See here for a list of behavior that is considered undefined in Rust: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
However, most (all?) of these require the use of
unsafe, which helps narrow down where the problem might be, if you trigger any of this behaviorYeah that is correct.
I was thinking in Safe Rust alone, and actually forgot about Unsafe Rust.
Because I have so far almost never used Unsafe Rust, except for C library bindings.