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-3761] Conform collections, optionals of Equatable to be Equatable #46346

Closed
airspeedswift opened this issue Jan 27, 2017 · 1 comment
Closed
Labels
affects ABI Flag: Affects ABI conditional conformances Feature → protocol → conformances: conditional conformances good first issue Good for newcomers 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

@airspeedswift
Copy link
Member

Previous ID SR-3761
Radar rdar://problem/20715566
Original Reporter @airspeedswift
Type Improvement
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 2
Component/s Standard Library
Labels Improvement, AffectsABI, StarterProposal
Assignee None
Priority Medium

md5: 6d3cdb1a04d43783843b631ae5d8ce00

Issue Description:

Arrays and Optionals currently have a definition of ==, but do not conform to Equatable. Conditional conformance should enable this. This should also enable arrays of optionals, arrays of arrays etc to also be equated.

A proposal is needed for this. One thing to consider during the evolution process is whether all such Collection s should be Equatable, with collections that need special treatment because they are unordered, e.g. Set or Dictionary to opt-out of the default and implement their own.

@huonw
Copy link
Mannequin

huonw mannequin commented Apr 5, 2018

This was proposed and accepted in https://github.com/apple/swift-evolution/blob/master/proposals/0143-conditional-conformances.md#standard-library-adoption, and implemented. The radar is closed so let's do the same for this one.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added conditional conformances Feature → protocol → conformances: conditional conformances good first issue Good for newcomers swift evolution implemented Flag → feature: A feature that was approved through the Swift evolution process and implemented and removed StarterProposal labels Nov 11, 2022
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 conditional conformances Feature → protocol → conformances: conditional conformances good first issue Good for newcomers 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

2 participants