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

BTree Monstrousity! #25

Closed
ripytide opened this issue Apr 6, 2023 · 0 comments · Fixed by #26
Closed

BTree Monstrousity! #25

ripytide opened this issue Apr 6, 2023 · 0 comments · Fixed by #26
Labels
dehancement Removal of a feature enhancement New feature or request

Comments

@ripytide
Copy link
Owner

ripytide commented Apr 6, 2023

After attempting #21 and failing, I decided several of my approaches in the v0.1.1 release were misguided, not assuming Copy on K and I made the implementations so so so painful despite the fact all the K's and I's I ever plan on using this data structure with will be Copy.

Secondly and more specifically to #21, is that it still doesn't address the OrdWrapper bodge which also greatly complicates the implementations as you have to encode the orderings into the type at compile time which is a right pain when you require runtime dependent comparisons.

So after taking inspiration from eggyal/copse I forked it and created ripytide/btree_monstrousity. I modified every single function to take a Closure that decides all the Orderings at runtime! And hence the keys you store no longer have to be Ord!!

This has made the code much simpler and more elegant than before. I have also removed many of the "helper-style" functions such as cut_same, append_platonic etc.. since they are all easily achievable on the user side and it's a lot of work to maintain so many extra functions.

@ripytide ripytide added enhancement New feature or request dehancement Removal of a feature labels Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dehancement Removal of a feature enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant