Uh oh!
There was an error while loading. Please reload this page.
Rename MaybeUninit to MaybeUninitialized - #56138
Conversation
shepmaster
commented
Nov 21, 2018
r? @RalfJung |
shepmaster
commented
Nov 21, 2018
I know this is racing your other PR, so you get to review! |
This comment has been minimized.
This comment has been minimized.
RalfJung
commented
Nov 21, 2018
Fine for me. @rust-lang/libs @rust-lang/lang any objections? |
withoutboats
commented
Nov 21, 2018
What's the motivation for this change? |
shepmaster
commented
Nov 21, 2018
Wrds r btr thn abbrs. |
shepmaster
commented
Nov 21, 2018
For full context, if you start reading the comments here, there's an overwhelming consensus to add more words into the method names of this type to better indicate their unsafety and usage concerns. Since the point of all of those words is to force the user to think more about careful usage of this type, making sure that the type's name itself is unambiguous is a good start. |
withoutboats
commented
Nov 21, 2018
What could |
The specific example there is |
shepmaster
commented
Nov 21, 2018
Ok |
SimonSapin
commented
Nov 21, 2018
There is also a precedent in the standard library to avoid sometimes-well-established abbreviations: |
I actually think we should do this and would propose reopening the PR. We usually avoid abbreviations unless they are extremely widely used (like pretty much all of @withoutboats' examples). Another example is |
This comment has been minimized.
This comment has been minimized.
dca115d to
4523174Comparevarkor
commented
Nov 21, 2018
I think some of the examples like |
RalfJung
commented
Nov 21, 2018
Note that this replaces |
nikic
commented
Nov 21, 2018
|
joshtriplett
commented
Nov 21, 2018
I certainly don't want to see this used often, but at the same time, this seems like unnecessary syntactic salt. |
Centril
commented
Nov 22, 2018
My main gripe is with I don't think a lot is gained by lengthening the name of the type here but at the same time I don't feel the need for unsafe code to be overly ergonomic to write. So my reaction to this PR is pretty neutral. I'm not for nor against it -- if you can convince everyone else then I'm sold. :) |
WiSaGaN
commented
Nov 23, 2018
“maybe uninitialized" is pretty commonly used term in system programming: https://stackoverflow.com/questions/14132898/gcc-wuninitialized-wmaybe-uninitialized-issues System programmers that are used to the term will make more effort to recognize "MaybeUninit" than the more commonly used fully spelled out version. It is also easier to relate "MaybeUninitialized" to the original "mem::uninitialized" method. |
bors
commented
Nov 27, 2018
☔ The latest upstream changes (presumably #54668) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
@rfcbot concern i-am-un-maybe-init @Centrilclaimed that I'm speaking about the benefit for human authors and code reviewers, especially those who are perhaps looking over something quickly and might not catch an occurrence of "Maybe" (even when next to "Init") but would catch "Uninit". I don't think there is a net win from renaming replacing (I don't have an opinion about the original proposal to lengthen the name to |
scottjmaddox
commented
Jan 16, 2019
|
joshtriplett
commented
Jan 18, 2019
@pnkfelix I agree entirely, and I have the same objection. This not only doesn't seem worth the change, it seems less clear. |
Centril
commented
Jan 21, 2019
rfcbot
commented
Jan 21, 2019
@Centril proposal cancelled. |
I propose that we finalize the name of the type as @rfcbot merge (EDIT: this is a bit weird.. we're "merging" but this means that the PR itself will be closed...) |
Team member @Centril has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed. Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
I don't know enough HCI to refute this claim, but it seems odd to expect people to read the middle of a word but not the beginning. Similarly, it seems odd that people are more likely to catch "Uninit" than they would be "Uninitialized". |
nikomatsakis
commented
Feb 4, 2019
While I checked my name, I would like to note for the record that I prefer the name |
rfcbot
commented
Feb 4, 2019
🔔 This is now entering its final comment period, as per the review above. 🔔 |
tesuji
commented
Feb 8, 2019
I am not a native English speaker, and have not used much |
I find the mixture of abbreviations with long spellings in the API weird: Without consistency, unless I use this API all-day every-day I pretty much have to guess whenever I need it. I wish the standard library would have clear guidelines about this instead of each API doing its own thing, it would save us a lot of time (bikeshedding, context-switching to the docs because rustc does not suggest the right thing, etc.). |
rfcbot
commented
Feb 14, 2019
The final comment period, with a disposition to merge, as per the review above, is now complete. |
RalfJung
commented
Feb 14, 2019
So, uh, I guess we just close this PR now? |
Centril
commented
Feb 14, 2019
Indeed we should; Thank you @shepmaster for your work & proposal. |
Proposal to finalize the name as
MaybeUninit#56138 (comment) -- as in, the FCP is to close this PR.rfcbot comment is here
Changed via:
Checked via: