Closed ra1028 closed 5 years ago
@ra1028 Hi, first of all, congrats on DifferentKit, seems like a nifty framework 👍
About the use of hashValue, my first thinking was to have a quick way to check if 2 objects are not equal, but it can potentially give room for hash value collision. I think I will update the project according to the suggestions
@ra1028 Currently the hashValue
acts like an id
, which has potentiality for collisions, I'm thinking about following React to introduce key
instead
@onmyway133 I think this can be closed with the introduction of DiffAware
protocol?
I found this problem when I wrote a comparison in the README of my diffing library DifferenceKit.
As described in the Apple document, it's obviously wrong to use
hashValue
to identify the elements.In heckel algorithm, It's necessary to use
Hashable
compliant object itself for the key of symbolic-table. Since this has a big impact on performance, you should also update the README.I know that this issue duplicated with https://github.com/onmyway133/DeepDiff/issues/13. Why did you close it?