diffx
diffx copied to clipboard
intelligent set diffs
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?
Do you have any examples where that could be useful?
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 :)
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?