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-square59linkfedilinkarrow-up195arrow-down13
arrow-up192arrow-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-square59linkfedilink
minus-squarefruitcantfly@programming.devlinkfedilinkarrow-up1·edit-25 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-23 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.