Skip to content

Exposing container examples as part of the library #13

Closed

Description

@ozkutuk

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).

Activity

  1. fpringle commented on Jan 31, 2026

    @fpringle
    Owner

    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.

  2. ozkutuk commented on Jan 31, 2026

    @ozkutuk
    ContributorAuthor

    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!

  3. fpringle commented on Jan 31, 2026

    @fpringle
    Owner

    @ozkutuk I've started generic-diff-instances here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions