-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Book - short explanation of arity #22368
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
I have additional plans here, but in the meantime, this is fine. Thank you! |
@bors: r+ 89822el rollup |
🙀 You have the wrong number! Please try again with |
@steveklabnik if you can share what you plan, or a issue number I may be able to contribute :) |
I want to make a "glossary" chapter that this and some other things (like 'parametric polymorphism') can just link to |
I like the idea, will try it out |
@@ -47,7 +47,8 @@ This pattern is very powerful, and we'll see it repeated more later. | |||
|
|||
There are also a few things you can do with a tuple as a whole, without | |||
destructuring. You can assign one tuple into another, if they have the same | |||
arity and contained types. | |||
contained types and arity. Tuples have the same arity when they have the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why introduce the concept of "arity" here at all? "length" should be good enough, and I've never seen the word "arity" being used in this context in discussions about Rust.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On #21568 there is a big discussion on this topic.
As for this commit, I think it is kind of a middle ground. And a concrete improvement.
But I guess length would also work
@steveklabnik What made you change your mind? In rust-lang/rust-by-example#97 you decided we don't need glossaries. They're too difficult. Now you want one? |
There's been a few things, but I think it's mostly that that's Rust by
Example, and this is the book. I'm also still not 100% sure this is the
best fix, giving it a try and seeing how it goes.
|
I think it's a good idea. Definitely try it before rejecting it. Can be more direct and pertinent to Rust than a wikipedia article could be. |
#21568