Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-1962] Consider simplifying the isUniquelyReferenced() family and eliminating NonObjectiveCBase #44571

Closed
gribozavr opened this issue Jul 1, 2016 · 3 comments
Assignees
Labels
affects ABI Flag: Affects ABI feature A feature request or implementation improvement standard library Area: Standard library umbrella swift evolution implemented Flag → feature: A feature that was approved through the Swift evolution process and implemented

Comments

@gribozavr
Copy link
Collaborator

gribozavr commented Jul 1, 2016

Previous ID SR-1962
Radar rdar://problem/21886410
Original Reporter @gribozavr
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, AffectsABI, swift-evolution-proposal-needed
Assignee @aschwaighofer
Priority Medium

md5: 108ada538de9b191a8ad6a831346edce

Issue Description:

Because of the low-level nature of the isUniquelyReferenced operation, one possible design is to eliminate NonObjectiveCBase, and instead just have the isUniquelyReferencedUnsafe operation, that would check the contract in debug mode, but would be fast in release mode.

For most use cases, developers should be able to use the ManagedBufferPointer type, so it is probably acceptable to choose the smaller API surface in the tradeoff between having only isUniquelyReferencedUnsafe for custom classes and complicating the standard library API with a special superclass type.

This would leave us with two functions:

  • isUniquelyReferencedUnsafe()

  • isUniquelyReferencedNonObjC()

@aschwaighofer
Copy link
Member

Merged in 4ea93f6

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added improvement feature A feature request or implementation swift evolution implemented Flag → feature: A feature that was approved through the Swift evolution process and implemented and removed bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal labels Mar 28, 2023
@AnthonyLatsis
Copy link
Collaborator

Proposal: SE-0125.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects ABI Flag: Affects ABI feature A feature request or implementation improvement standard library Area: Standard library umbrella swift evolution implemented Flag → feature: A feature that was approved through the Swift evolution process and implemented
Projects
None yet
Development

No branches or pull requests

3 participants