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

docs: simplify wording #34145

Merged
merged 1 commit into from Jun 10, 2016
Merged

docs: simplify wording #34145

merged 1 commit into from Jun 10, 2016

Conversation

matklad
Copy link
Member

@matklad matklad commented Jun 7, 2016

It took me more then a moment to decipher "with no non-'static" thing :)

"'static type" should say the same thing more clearly.

r? @steveklabnik

@steveklabnik
Copy link
Member

Hmmm. We don't usually use these words these ways, though I do agree that the original sentence is awkward. What about something like

Most types implement Any. However, any type which contains a non-'static reference does not.

?

@matklad
Copy link
Member Author

matklad commented Jun 7, 2016

Do you mean that something's wrong with the English, or that something's wrong with the Rust terminology (static type)? In the latter case we might want to change the module level docs as well because they mention "static type". I've updated the PR anyway.

Wow, I think I see it now. "dynamic typing of static types" surely can cause confusion if you are not familiar with lifetimes. Should I change the module level docs to something like

This module implements the Any trait, which enables dynamic typing of any type with 'static lifetime through runtime reflection.

@steveklabnik
Copy link
Member

Do you mean that something's wrong with the English, or that something's wrong with the Rust terminology (static type)?

The latter, we don't call things "static types". It's entirely possible that the module docs are bad; I haven't looked at them at all, so they've been whatever someone has felt like writing from a long time back, possibly before we even had unified terminology.

Should I change the module level docs to something like

This is where terms get hard :) Strictly speaking, a type doesn't have a lifetime, a type might be parameterized over a lifetime, though... My first reaction is something similar: "of many types through runtime reflection." and then mention the exception after the summary line.

@steveklabnik
Copy link
Member

(that said, I'm also happy to merge this without updating the module docs, whichever you want!)

@matklad
Copy link
Member Author

matklad commented Jun 7, 2016

Ok, lets merge this as is. Looks like it's better to revise the whole docs for any module, and I don't feel like it at the moment :)

Strictly speaking, a type doesn't have a lifetime, a type might be parameterized over a lifetime, though...

How would you say T: 'static in English then? "T outlives static" sounds awkward to me.

@steveklabnik
Copy link
Member

@bors: r+ rollup

I agree 😄

How would you say T: 'static in English then? "T outlives static" sounds awkward to me.

Usually "bound by the 'static lifetime" or "contains no non-'static references," which is uh, the wording that was confusing here 😄 .

@bors
Copy link
Contributor

bors commented Jun 7, 2016

📌 Commit 7abdbd4 has been approved by steveklabnik

Manishearth added a commit to Manishearth/rust that referenced this pull request Jun 8, 2016
docs: simplify wording

It took me more then a moment to decipher "with no non-`'static`" thing :)

"`'static` type" should say the same thing more clearly.

r? @steveklabnik
sanxiyn added a commit to sanxiyn/rust that referenced this pull request Jun 10, 2016
docs: simplify wording

It took me more then a moment to decipher "with no non-`'static`" thing :)

"`'static` type" should say the same thing more clearly.

r? @steveklabnik
sanxiyn added a commit to sanxiyn/rust that referenced this pull request Jun 10, 2016
docs: simplify wording

It took me more then a moment to decipher "with no non-`'static`" thing :)

"`'static` type" should say the same thing more clearly.

r? @steveklabnik
bors added a commit that referenced this pull request Jun 10, 2016
Rollup of 12 pull requests

- Successful merges: #34088, #34129, #34136, #34145, #34146, #34148, #34159, #34160, #34165, #34175, #34184, #34185
- Failed merges:
@bors bors merged commit 7abdbd4 into rust-lang:master Jun 10, 2016
@matklad matklad deleted the any-docs branch July 9, 2019 12:34
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

3 participants