-
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
Standardize some usages of "which" in docstrings #19873
Conversation
In US english, "that" is used in restrictive clauses in place of "which", and often affects the meaning of sentences. In UK english and many dialects, no distinction is made. While Rust devs want to avoid unproductive pedanticism, it is worth at least being uniform in documentation such as: http://doc.rust-lang.org/std/iter/index.html and also in cases where correct usage of US english clarifies the sentence.
Not a native english speaker but the PR looks good to me! Thanks for your contribution 👍 |
Thanks FlaPer87! My reading of the contributor guide is that editing non-example parts of docstrings does not require re-running the test suite, but is a bit vague. I have not build rust yet myself, let alone the test suite; I'm on a crappy laptop and no access to a workstation at the moment. |
Oh hey, Travis is happy. Does that mean the tests passed too? |
Adding some citations, from http://www.chicagomanualofstyle.org/qanda/data/faq/topics/Whichvs.That.html :
None of these examples have commas, so I'm inclined to say that they're okay. Then again, the CMOS isn't neccesarily authoritative, and both sound perfectly fine to my ear. What do you think, @drewm1980 ? |
Also: Travis just runs a very simple formatting check, so it doesn't mean that all the tests pass, just that nothing is obviously wrong. Also, it's true, re-running the tests for just English changes isn't particularly important, our CI system will end up running them anyway, but this shouldn't change anything about them, so you don't need to as well. |
"In polished American prose, that is used restrictively to narrow a category or identify a particular item being talked about: “any building that is taller must be outside the state”; which is used nonrestrictively—not to narrow a class or identify a particular item but to add something about an item already identified: “alongside the officer trotted a toy poodle, which is hardly a typical police dog.”CMOS The CMOS blog post you linked to is advocating ~not using the commas with "that", and using them with "which", in ~addition to using the precise American usage. Using which in these cases, with or without a comma sounds totally wrong to me, but I may be biased, having grown up in a suburb of Chicago rather than a suburb of London. Anyway, the American usage is consistent with the Brittish rules, so at least in this case, we can be consistent AND support both US and British English. Besides, in this particular case we want user's eyes to be drawn to the differences between the iterators, not the differences between different dialects of English. |
Oh, don't I know this feel. My hometown basically has an entire dialect: http://www.pittsburghese.com/
Agreed 100%. |
Standardize some usages of "which" in docstrings Reviewed-by: steveklabnik
Using a type alias for iterator implementations is fragile since this exposes the implementation to users of the iterator, and any changes could break existing code. This commit changes the iterators of `VecMap` to use proper new types, rather than type aliases. However, since it is fair-game to treat a type-alias as the aliased type, this is a: [breaking-change].
Standardize some usages of "which" in docstrings Reviewed-by: steveklabnik
In US english, "that" is used in restrictive clauses in place of "which", and often affects the meaning of sentences. In UK english and many dialects, no distinction is made. While Rust devs want to avoid unproductive pedanticism, it is worth at least being uniform in documentation such as: http://doc.rust-lang.org/std/iter/index.html and also in cases where correct usage of US english clarifies the sentence.
Standardize some usages of "which" in docstrings Reviewed-by: steveklabnik
In US english, "that" is used in restrictive clauses in place of "which", and often affects the meaning of sentences. In UK english and many dialects, no distinction is made. While Rust devs want to avoid unproductive pedanticism, it is worth at least being uniform in documentation such as: http://doc.rust-lang.org/std/iter/index.html and also in cases where correct usage of US english clarifies the sentence.
In US english, "that" is used in restrictive clauses in place of
"which", and often affects the meaning of sentences.
In UK english and many dialects, no distinction is
made.
While Rust devs want to avoid unproductive pedanticism, it is worth at
least being uniform in documentation such as:
http://doc.rust-lang.org/std/iter/index.html
and also in cases where correct usage of US english clarifies the
sentence.