Giooschi@lemmy.world to Rust@programming.devEnglish · 3 months agoA comparison of Rust's borrow checker to the one in C#em-tg.github.ioexternal-linkmessage-square19fedilinkarrow-up10arrow-down10
arrow-up10arrow-down1external-linkA comparison of Rust's borrow checker to the one in C#em-tg.github.ioGiooschi@lemmy.world to Rust@programming.devEnglish · 3 months agomessage-square19fedilink
minus-squareBB_C@programming.devlinkfedilinkarrow-up0·3 months agoIs what the author calls a C# borrow checker purely lexically based? The first error message gives that impression. And if it is, then it wouldn’t qualify for any such comparisons with 2018+ Rust.
minus-squareGetOffMyLan@programming.devlinkfedilinkarrow-up0·edit-23 months agoIt’s 100% not a borrow checker because c# doesn’t have borrowing. It’s just static analysis to ensure memory safety. But the author acknowledges that. It’s just checking the scopes the variables are defined in in the first example.
Is what the author calls a C# borrow checker purely lexically based? The first error message gives that impression. And if it is, then it wouldn’t qualify for any such comparisons with 2018+ Rust.
It’s 100% not a borrow checker because c# doesn’t have borrowing. It’s just static analysis to ensure memory safety. But the author acknowledges that.
It’s just checking the scopes the variables are defined in in the first example.