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

Make set better #924

Open
rafaqz opened this issue Feb 2, 2025 · 0 comments
Open

Make set better #924

rafaqz opened this issue Feb 2, 2025 · 0 comments

Comments

@rafaqz
Copy link
Owner

rafaqz commented Feb 2, 2025

It would be nice to remove reorder, shiftlocus and user level use of rebuild, and just use set for everything.

There are a few steps needed to make this possible:

  1. set and unsafe_set are split so that set always fixes everything to match the change, like reordering the array if you do set(A; X=> ForwardOrdered). Then unsafe_set would never fix anything else in the object, and just change the thing you specify.
  2. keywords to set work just like rebuild, but fix everything that needs to be fixed from the change. Keywords to unsafe_set are just rebuild.

Then rebuild is back to being an internal method, shiftlocus is gone as set(A, Center()) will just work, and we heavily document set and unsafe_set and make sure they always behave in intuitive ways.

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

1 participant