55
A comparison of Rust's borrow checker to the one in C#
(em-tg.github.io)
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits
I found it hard to follow despite C# being my main driver.
Using
ref
, in the past, has been about modifiable variable references.All these introductions, even when following C# changes across recent versions, were never something I actively used, apart from the occasional adding ref to structs so they can contain existing ref struct types. It never seems necessary.
Even without ref you use reference and struct types, where reference content can be modified elsewhere. And
IDisposable
for object lifetimes with cleanup.