What is ownership?
Ownership is the responsibility of some piece of code to eventually cause a value to be destroyed. An ownership system is a set of rules or conventions for managing and transferring ownership.
# Ownership
## Introduction
Adding "ownership" to Swift is a major feature with many benefits
for programmers. This document is both a "manifesto" and a
"meta-proposal" for ownership: it lays out the basic goals of
the work, describes a general approach for achieving those goals,
and proposes a number of specific changes and features, each of
which will need to be separately discussed in a smaller and more
targeted proposal. This document is intended to provide a framework
for understanding the contributions of each of those changes.
### Problem statement
The widespread use of copy-on-write value types in Swift has generally
been a success. It does, however, come with some drawbacks:
* Reference counting and uniqueness testing do impose some overhead.
This file has been truncated. show original
This thread was posted by one of our members via one of our news source trackers.
bot
23 February 2021 22:27
2
Corresponding tweet for this thread:
Share link for this tweet.