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

make the borrowing example more concrete #32991

Merged
merged 2 commits into from
Apr 28, 2016
Merged

Conversation

kindlychung
Copy link
Contributor

No description provided.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (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. Due to 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 the contribution instructions for more information.

@Manishearth
Copy link
Member

r? @steveklabnik

I'm a bit concerned about overcomplicating it, since this is a crucial section of the book.

@kindlychung
Copy link
Contributor Author

Being a beginner myself, the original example looks dull to me. Pass two references into a function, and then do nothing with it? Then what's the point in passing them in the first place? It's just intellectually very unsatisfying.

In the modified example, the reader can immediately see that some work is done with these references. The machineries, which are a bit more involved, are hidden behind another function, and the reader doesn't need to understand it at this stage, but they can always look back when they want.

@Manishearth
Copy link
Member

It's just intellectually very unsatisfying.

Bear in mind that not everyone approaches Rust with the same level of understanding, so "intellectually satisfying" is less priority than everyone being able to understand. 😄

"do stuff with v1 and v2" already indicates that the function is going to do something, but it's elided for the purposes of simplicity.

I'm okay with additional examples, but I'd like there to be at least one simple example without much going on that clearly demonstrates the point.

@steveklabnik
Copy link
Member

Yes, this section needs to be very simple, even if it's a bit dry. Also worth noting that I've completely re-done all of this in the new book, so it's gonna eventually be replaced anyway.

So, I share @Manishearth 's concern here. What about adding this as second example, after the original one as the first?

@kindlychung
Copy link
Contributor Author

Ok, that's fine.

@steveklabnik
Copy link
Member

@kindlychung great! Please ping me when you have the time to do it :)

@kindlychung
Copy link
Contributor Author

@steveklabnik Done.

@steveklabnik
Copy link
Member

@bors: r+ rollup

thanks! :)

@bors
Copy link
Contributor

bors commented Apr 26, 2016

📌 Commit 10abb66 has been approved by steveklabnik

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 27, 2016
bors added a commit that referenced this pull request Apr 27, 2016
Rollup of 8 pull requests

- Successful merges: #32991, #33056, #33095, #33152, #33212, #33218, #33233, #33234
- Failed merges:
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 28, 2016
bors added a commit that referenced this pull request Apr 28, 2016
Rollup of 7 pull requests

- Successful merges: #32991, #33056, #33095, #33152, #33212, #33218, #33234
- Failed merges: #32912
@bors bors merged commit 10abb66 into rust-lang:master Apr 28, 2016
@kindlychung kindlychung deleted the patch-2 branch April 29, 2016 12:59
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

Successfully merging this pull request may close these issues.

None yet

5 participants