4 ms·
>Ownership based memory Is this not just ARC?
by aphextron 6y ago
>Ownership based memory
Is this not just ARC?
- adamnemecek 6y agoIt is not, no, although you can choose to have some types to be Arc. By default the compiler can reason about whether a value is accessed mutably in only one place.
- steveklabnik 6y agoFundamentally different. ARC involves reference counting, and so is a run-time strategy. Ownership in Rust is at compile-time, instead. Now, it is true that languages that use ARC can do compile-time analysis to remove some refcount traffic, and that you can use run-time ownership tracking in Rust if you'd like. The difference is what's built into the languages, what is the default vs what is not, and the kinds of patterns those tend to enable.