Skip to content

Make set better #924

@rafaqz

Description

@rafaqz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions