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

Align with Identifiable, Add ContentIdentifiable #81

Closed
wants to merge 3 commits into from

Conversation

Marcocanc
Copy link
Contributor

@Marcocanc Marcocanc commented Oct 19, 2019

Checklist

Description

Since the identity component of Differentiable is semantically identical to the new Identifiable protocol in Swift 5.1, I think it would be beneficial to align the two APIs.

Related Issue

#80

Motivation and Context

This allows us to easily conform to Identifiable as well as Differentiable through a single implementation.

Impact on Existing Code

This will break conformance to Differentiable in existing imlpementations, unless implicit conformance through Hashable/Equatable was used.

Implementation Details

  • Separate Equality (ContentEquatable) and Identification (ContentIdentifiable) components through the use of protocol composition for Differentiable
  • Align the API of ContentIdentifiable to that of Identifiable

@ra1028 ra1028 closed this Oct 22, 2019
@ra1028
Copy link
Owner

ra1028 commented Oct 22, 2019

Merge #83 instead of here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants