Questions tagged [ownership]

For questions about design or implementation of languages or type systems featuring ownership, a type system feature where values can have an owner, who is allowed to access or mutate them, while other references to it are forbidden. Ownership systems impose varying constraints and may include e.g. borrowed references, multiple owners, lifetimes, and other aspects.

Filter by
Sorted by
Tagged with
15 votes
2 answers

Could ownership be inferred?

Rust famously has the concept of ownership vs. borrowing as part of its type system. This allows some level of automatic memory management ─ that is, heap allocations are freed when their owner goes ...
kaya3's user avatar
  • 18.4k
12 votes
3 answers

Is it possible to extend C to have the Rust concept of ownership for memory safety?

Rust has a number of memory safety features. Is it possible to extend or enhance C or C++ to also provide similar memory safety features instead of using workarounds such as the Valgrind tool suite?
James Risner's user avatar