HaraldvonBlauzahn@feddit.org to Linux@lemmy.mlEnglish · 2 days ago'Rust makes coding fun again': Why Linux is moving away from C, according to Greg Kroah-Hartmanwww.zdnet.comexternal-linkmessage-square84linkfedilinkarrow-up1163arrow-down15
arrow-up1158arrow-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 · 2 days agomessage-square84linkfedilink
minus-squarefruitcantfly@programming.devlinkfedilinkarrow-up2·edit-26 hours 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-25 hours 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.