this post was submitted on 27 Oct 2024
55 points (96.6% liked)
Rust
5989 readers
48 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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.