Re:Microsoft is to enable Rust use for Windows 11 kernel
by dataflow on Friday April 28, 2023 @03:26PM
(#35745974)
> the use-after-move checks aren't bugprone in Rust
I can't tell if one if us is confused here or if this is just confusing wording, but the check I referred to is not bug-prone. The pattern of using something after it's been moved from is bug-prone (even though it'd work fine for things like integers, in either language), and it's checking for that bug-prone pattern, hence the name.
Re:Microsoft is to enable Rust use for Windows 11 kernel
by db48x on Friday April 28, 2023 @06:06PM
(#35747692)
In Rust it’s not bug–prone. The compiler knows which types are moved and which are copied, and if you write code that uses something after it was moved you get a compile–time error.
I can't tell if one if us is confused here or if this is just confusing wording, but the check I referred to is not bug-prone. The pattern of using something after it's been moved from is bug-prone (even though it'd work fine for things like integers, in either language), and it's checking for that bug-prone pattern, hence the name.