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

Add a "set_copyable" op to the collections extensions #1640

Open
doug-q opened this issue Nov 7, 2024 · 0 comments
Open

Add a "set_copyable" op to the collections extensions #1640

doug-q opened this issue Nov 7, 2024 · 0 comments

Comments

@doug-q
Copy link
Collaborator

doug-q commented Nov 7, 2024

The existing set op unconditionally returns the old value in the list. This is necessary when the elements of the list have a linear type, but when the elements of the list have a copyable type this can be inefficient for large elements.

I suggest we rename the existing set to swap, and add set which does not return the old value and which requires that the element type is copyable.

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