Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use generic map merging framework #937

Open
jcranch opened this issue Mar 13, 2023 · 1 comment
Open

Use generic map merging framework #937

jcranch opened this issue Mar 13, 2023 · 1 comment

Comments

@jcranch
Copy link

jcranch commented Mar 13, 2023

It is possible to make the code for merge tactics generic (so it can be used for Map and IntMap without duplication, and could also be used for other map-like data structures in other libraries), and to increase the safety in doing so.

I have created a repository containing both an implementation and a fairly lengthy explanation of how it works.

There are some decisions to be made about how to do it: most noticeably, there is a dependency upon Kinoshita's witherable library. I have demonstrated that this library can be trimmed down heavily, but there are still several possibilities for where it should go: it could go into base, into containers, or remain as a separate library (which would then need to be a dependency of containers).

@tomjaguarpaw has spent some time reviewing these ideas (I'm grateful for feedback on an earlier version); he may be willing to make his thoughts known.

@tomjaguarpaw
Copy link
Member

Yes, I found @jcranch's write up excellent and I'd recommend it to the containers maintainers. His idea could prove to be a very nice and practical way of generalising merge functionality.

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

No branches or pull requests

2 participants