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

Change deleteat! to delete! #28367

Closed
dpsanders opened this issue Jul 31, 2018 · 3 comments
Closed

Change deleteat! to delete! #28367

dpsanders opened this issue Jul 31, 2018 · 3 comments
Labels
breaking This change will break code

Comments

@dpsanders
Copy link
Contributor

As far as I can tell, there is no overlap between the methods of deleteat! and those of delete!.
I suggest that deleteat! can simply become delete!.

@dpsanders
Copy link
Contributor Author

Dup of #20531.

But it still really feels like deleteat! should just be delete!.

@andyferris
Copy link
Member

I actually feel the opposite way here...

I'd like to see a coherent (across a range of different container types) interface for containers whose keys might change. With delete! a single key is removed. With deleteat! a key is removed and a whole string of other key-values are remapped. In this sense, they are different generic functions.

I've been tempted to open an issue about insert!. Dictionaries should probably support separate operations for insert, update, and so-called "upsert" (current behavior of Dict's setindex!). If deleteat! follows a different semantic to delete! then (to me) it might follow that insert! for Vector might be better called insertat! and support an insert-only insert! function for AbstractDicts.

@brenhinkeller brenhinkeller added the breaking This change will break code label Nov 19, 2022
@brenhinkeller
Copy link
Sponsor Contributor

Given the expanses of elapsed time and how breaking it would be nowadays, I'm tempted to call this "not planned", but feel free to undo!

@brenhinkeller brenhinkeller closed this as not planned Won't fix, can't repro, duplicate, stale Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This change will break code
Projects
None yet
Development

No branches or pull requests

3 participants