-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Using tuples as arguments #17274
Comments
This is already possible, just not automatically like your snippet suggests: fn sum((x, y): (int, int)) -> int { |
You could go the
I believe you should be able to mimic Scala's |
Variadic generics adds a similar feature to Rust, but with a more explicit syntax: |
"Before 1.0" isn't relevant; Rust is on a rolling release model. |
A language change like this should be proposed through the RFC process: https://github.com/rust-lang/rfcs An issue like this isn't actionable because a clear design and consensus to implement it are required before making language changes. |
In rust we have possibility to return several values in tuple. But we can't use it vice versa: to put several arguments to function in tuple. Like this:
I think it will be very usefull.
The text was updated successfully, but these errors were encountered: