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-408] Foundation requires a factory pattern for creating class clusters #43025

Open
phausler opened this issue Dec 29, 2015 · 1 comment
Open
Labels
compiler The Swift compiler in itself feature A feature request or implementation

Comments

@phausler
Copy link
Member

Previous ID SR-408
Radar None
Original Reporter @phausler
Type New Feature
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels New Feature, LanguageFeatureRequest
Assignee None
Priority Medium

md5: c72472827065bb4d1b05fda9a937428f

blocks:

  • SR-72 NSNumber is missing much parity

Issue Description:

When creating clusters like NSString, NSNumber NSDictionary etc we have to pollute the subclasses with ivars and we don't have uniqueness like [NSNumber numberWithBool:]'s return value being identical or NSNull being identical to all creations.

This leads to either poor performance and memory thrashing, or it will lead to divergent interfaces that make the swift-corelibs-foundation behave differently than the darwin objc version.

Proposals have been floated around for this and it seems amenable; however it would be nice to pick those up in as official proposals to un-block the development of Foundation with swift.

@swift-ci
Copy link
Collaborator

Comment by Michael Getz (JIRA)

Related apple/swift-evolution#247

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself feature A feature request or implementation
Projects
None yet
Development

No branches or pull requests

3 participants