-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Support destructuring in function arguments #1881
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
Comments
Would |
Do we really need this? I know that occasionally I have thought it would be nice to have, but we have lasted this long without anybody complaining loudly about it, so it doesn't seem vital. |
It'd be consistent. I occasionally find myself wanting to use this -- mostly for tuple arguments. |
I wonder how it would interact with our various argument modes. Does it effectively turn them all into copies? Is it only compatible with certain modes? |
Hm. I assumed that regular modes (non-copy/move) would be able to just create views into the existing value without copying, since such args are immutable locals, but I guess if that value has mutable components, this would mess with the invariant that locals don't get their values changes from under them. For by-copy and by-move the story gets even more involved. Maybe you're right that we shouldn't bother. |
I'm closing this. If someone feels strongly about supporting this, discuss. |
Remove old action file since it's in a new repo now. I also updated our release workflow to check the new repo instead of this old file.
Basically, allow things like
fn foo((a, b): (int, int), @u: @something) {}
.We talked about this in the Toronto meeting. I was surprised that no issue existed for it.
The text was updated successfully, but these errors were encountered: