You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exposing container examples as part of the library #13
First of all, thanks for the library! I have been experimenting with integrating generic-diff into my project's test suite and it seems promising so far. I have pretty much copied the orphan instances for various containers from the examples directory and they seem to be working great. Is there a particular reason why they are not provided as part of the library? I do understand that they are not the only sensible way to implement the Diff instances, but I think the instances in question are generally useful enough that providing them as part of the library would be helpful for most users. If providing them by default is a concern, it might also potentially be a good idea to create a separate generic-diff-instances package. That way it would also be possible to ship a lot more instances for types from various packages (e.g. time).
Hi @ozkutuk, thanks for the kind words! The main reason I didn't put those instances in the main library are: keeping the dependency footprint small, the potential for other sensible instances, and that I simply didn't get round to it yet. But if you really need them, I'd be happy to split them into a separate "batteries-included" library of instances as you suggested.
Yeah, those are all fair points. I wouldn't say I really need them; it is only three instances that I have used from the examples, so I am fine with copy-pasting for the time being. If at any point you decide to create that "batteries-included" library, I can switch without much hassle. I just wanted to bring the idea to your consideration. Cheers!
Activity
fpringle commentedon Jan 31, 2026
Hi @ozkutuk, thanks for the kind words! The main reason I didn't put those instances in the main library are: keeping the dependency footprint small, the potential for other sensible instances, and that I simply didn't get round to it yet. But if you really need them, I'd be happy to split them into a separate "batteries-included" library of instances as you suggested.
ozkutuk commentedon Jan 31, 2026
Yeah, those are all fair points. I wouldn't say I really need them; it is only three instances that I have used from the examples, so I am fine with copy-pasting for the time being. If at any point you decide to create that "batteries-included" library, I can switch without much hassle. I just wanted to bring the idea to your consideration. Cheers!
fpringle commentedon Jan 31, 2026
@ozkutuk I've started
generic-diff-instanceshere.