Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upReserve name `Str` while it's not too late #1208
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I've tested the change on Rust itself (branch) - nothing breaks. Name |
This comment has been minimized.
This comment has been minimized.
|
Ok, it looks like names in the prelude are "weak" and can be redefined in user code without conflicts.
So, putting |
petrochenkov
closed this
Jul 13, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
petrochenkov commentedJul 13, 2015
If
stris ever moved to the library, as was planned, it would be good for it to follow the library conventions.It's likely that even if hypothetical 2.0 allows moderate breaking changes, it will still not be able to use the name
Strfor practical compatibility reasons. Now (before 1.2), while the language is not widely used, it still might be possible to reserve the name by putting it into the prelude.Detailed design:
type Str = str;somewhere in libcore.Strfrom the libstd prelude