Comments (3)
Thank you for your proposal @Marcocanc
As you described, Identifiable and Differentiable have semantically the same properties.
However, Identifiable has OS restrictions, and I think there are few benefits to use it with breaking API.
How about implementing such a simple extension?
public extension Differentiable where Self: Identifiable {
@inlinable
var differenceIdentifier: ID {
id
}
}
from differencekit.
Thanks for the quick feedback. I understand that aligning the API might not be worth breaking existing code bases.
I have created a separate PR (#83) which introduces ContentIdentifiable
and removes its dependency from ContentEquatable
. Differentiable
is now a composed protocol.
This will allow to work with the protocols on a more granular level and avoid any breaking APIs.
from differencekit.
Thanks @Marcocanc
The changes by #83 breaks the existing API, but agrees that it can be further clarified by separating identification and equality, so I'll allow this and include it in the next version 1.2.0.
Whether to change the naming differenceIdentifier
to id
will be discussed again when DifferenceKit grows to version 2.0.0.
from differencekit.
Related Issues (20)
- CollectionDifference API implementation HOT 1
- Compute changeset in the background
- To do the insert and delete operations at once
- Delete .swift-version
- Crash when I reload collectionView HOT 1
- Help needed with crash - NSInternalInconsistencyException HOT 1
- Buggy default reload method HOT 1
- How can I reload a table that is behind on the navigation stack? HOT 1
- UICollectionView reload animation
- Duplicate items with some edge cases in AppKitExtension HOT 13
- Why DifferenceKit is so much faster than Apple's Foundation diffing? HOT 2
- Animation option for row reloading is not a valid option in AppKitExtension
- Does it work seamlessly when using an UICollectionView with SwiftUI cells? HOT 2
- tvOS UICollectionView.reload crash
- The algorithm cannot get the best diff results? HOT 1
- `Differentiable` requres `Equatable` AND `Hashable`, but docs say otherwise
- Using only the diffing algorithm
- Invalid batch updates detected
- How to apply ChageSet to an array?
- Use UITableView reconfigureRows and UICollectionView reconfigureItems for ChangeSet.elementUpdated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from differencekit.