Skip to content

Request for adding a block remove operation for arrays #9

Closed
@joeltucci

Description

@joeltucci

Currently operations to remove elements in an array are hard to read/write by hand. You either need to list the indexes you want to delete in reverse order or recalculate the indices on the fly, since the operations are applied in a stream and each operation is dependent on the previous(for instance deleting the first 2 elements requires 2 /0's). I would like to propose a block_remove operation that takes an array of indexes(all corresponding to the same position in the original array) and deletes them all at once. This could not only make the resulting diffs more compact, it could also help people who create them by hand.

I have created an example implementation here: joeltucci@341eb02

I didn't want to do this as a pull request since it may need to be significantly reworked, but if possible I would like to see this feature implemented.

Let me know if you have any questions/issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions