-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Correct use of 'nul' 'null' and capitalization in the book #34294
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
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. 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. |
Hey @alexandermerritt ! Sorry this review took a while. So, we don't have any standard here, but IIRC, @retep998 specifically used |
I use |
@@ -521,14 +521,14 @@ against `libc` and `libm` by default. | |||
|
|||
# The "nullable pointer optimization" | |||
|
|||
Certain types are defined to not be `null`. This includes references (`&T`, | |||
Certain types are defined to not be `NULL`. This includes references (`&T`, |
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 is it back ticked here? It's definitely not an identifier that Rust uses, so it seems wrong.
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.
Yeah, I would also think that this shouldn't be backticked, even though it was originally
The way MSDN does it is they refer to strings as being null terminated, while the ascii character itself is referred to as |
@steveklabnik @retep998 Thanks for the feedback! The use of these terms seems to not be fully consistent and I believe leads to confusion. For example, Wikipedia uses "Null-terminated string" to mean C string terminated with I do not agree in written text that both a string can be "null-terminated" when there exists also a "null pointer", as a "null string" then means what? (A "C string" ends with My philosophy is, when referring to the values, Perhaps most of this is just a writing style preference? My motivation is that many people are still confused as to the difference between |
Whew, even in a language without null, null is a problem 😓
I like it. |
@bors: r+ roillup |
📌 Commit 161ba12 has been approved by |
Correct use of 'nul' 'null' and capitalization in the book r? @steveklabnik
A small comment: would it be useful to start some Rust project language guide to document these sorts of practices? That way there's something to point new contributors toward when writing docs, and obvious against which existing documentation can be evaluated. |
r? @steveklabnik