Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

intelligent set diffs #6

Open
adamw opened this issue Aug 16, 2019 · 3 comments
Open

intelligent set diffs #6

adamw opened this issue Aug 16, 2019 · 3 comments

Comments

@adamw
Copy link
Member

adamw commented Aug 16, 2019

apart from computing additional/missing elements, we could try to pair up mismatching elements when diffing sets in an intelligent way, so that two (different) elements are paired up in the final diff using "minimal difference". Or maybe we could assume that elements should be paired if they have e.g. 3 differences at most?

@ghostbuster91
Copy link
Collaborator

Do you have any examples where that could be useful?

@adamw
Copy link
Member Author

adamw commented Jan 12, 2021

Well if you have ... Set(Person("Adam", true, 10), Person("John", true, 20)) and Set(Person("Adam", fale, 10), Person("John", false, 20)) I'd like to have adam paired with adam nad john with john in the diff :)

@ghostbuster91
Copy link
Collaborator

Sounds cool but, that would require additional entity in the library or the redesign of ObjectMatcher. Anyway, I think that there should also be some threshold value below which there is no point in matching two objects. The threshold value could be a parameter to the SmartObjectMatcher constructor, WDYT?

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

No branches or pull requests

2 participants