Skip to content

Unclear description in closure section of Rust Book #28803

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

Closed
ghost opened this issue Oct 2, 2015 · 3 comments
Closed

Unclear description in closure section of Rust Book #28803

ghost opened this issue Oct 2, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 2, 2015

The first section on https://doc.rust-lang.org/stable/book/closures.html can be difficult to understand for novice programmers, particularly the line "Anonymous functions that have an associated environment are called ‘closures’, because they close over an environment." It's difficult from this context to understand what "environment" is referring to.

@steveklabnik
Copy link
Member

Yeah, this definition is kind of embarassingly self-referential 😓

@chills42
Copy link
Contributor

chills42 commented Oct 6, 2015

I'm going to try to clarify this.

chills42 added a commit to chills42/rust that referenced this issue Oct 6, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this issue Oct 7, 2015
This is to address issue rust-lang#28803 by improving some of the references to closures, to explain what they are more clearly, while hopefully still being concise.

r? @steveklabnik
steveklabnik added a commit to steveklabnik/rust that referenced this issue Oct 7, 2015
This is to address issue rust-lang#28803 by improving some of the references to closures, to explain what they are more clearly, while hopefully still being concise.

r? @steveklabnik
@steveklabnik
Copy link
Member

#28856 fixed this

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

2 participants