Uh oh!
There was an error while loading. Please reload this page.
RFC: std::ascii reform - #486
Conversation
SimonSapin
commented
Nov 27, 2014
I’ve published https://crates.io/crates/ascii / https://github.com/SimonSapin/rust-ascii |
SimonSapin
commented
Nov 27, 2014
By the way, I created starting point of the rust-ascii repository by running this command on a clone of the Rust repository: (The second command gets rid of the empty merge commits.) |
SimonSapin
commented
Nov 27, 2014
CC @Kimundi (original author of the module) |
Kimundi
commented
Nov 29, 2014
I don't mind in particular if this moves to a cargo package, but I'm a bit weary about cluttering |
SimonSapin
commented
Dec 1, 2014
@Kimundi regarding cluttering |
Kimundi
commented
Dec 1, 2014
No, please not free functions :) I just think that the current situation where those functions are defined on the |
SimonSapin
commented
Dec 2, 2014
The obvious problem with the |
drewm1980
commented
Dec 4, 2014
+1 for simplifying Rust's string story! Having one less char/string related type in std would have saved me significant time while learning rust. Could you get rid of char next? Coming from C I assumed it was 8 bits. If it were upper-cased, I might suspect it was some newfangled variable-length character type, but I find a lowercase 32 bit char type very surprising. |
steveklabnik
commented
Dec 4, 2014
People are often confused about 'char,' it's true. Very common IRC question. |
SimonSapin
commented
Dec 4, 2014
What the |
aturon
commented
Dec 5, 2014
I am wholly in favor of this proposal; the Ascii type is pretty clearly not carrying its weight, but the case conversion/testing functionality is important to provide in |
SimonSapin
commented
Dec 5, 2014
@aturon, any opinion on the unresolved questions? |
aturon
commented
Dec 5, 2014
Leave
Actually, it seems plausible to merge these traits.
I would lean toward "no", but we are planning to do a separate prelude stabilization so it doesn't matter for now.
Yes, as of today that's correct.
Depends somewhat on the prelude question; if it's not in the prelude, then probably all of the ones that have been marked |
SimonSapin
commented
Dec 7, 2014
|
SimonSapin
commented
Dec 7, 2014
@aturonhttps://github.com/SimonSapin/rust/tree/ascii-reform (not PR’d yet) |
SimonSapin
commented
Dec 8, 2014
In #503 (Stabilize std::prelude)
So the naming convention here is that a Given the above, |
blaenk
commented
Dec 10, 2014
Good one @SimonSapin. |
aturon
commented
Dec 16, 2014
Good point; we can keep these separate.
I think |
aturon
commented
Dec 16, 2014
Generally speaking, it seems like the stakeholders on this topic are satisfied with the design, as is the core team; this will simplify our string story, and follow the same pattern we're moving toward with unicode (where more advanced functionality lives in the Caroverse). Thanks for proposing this, @SimonSapin! I'm going to merge this RFC. @SimonSapin, you want to turn your branch into a PR? |
Implements [RFC 486](rust-lang/rfcs#486). Fixes#19908. * Rename `to_ascii_{lower,upper}` to `to_ascii_{lower,upper}case`, per #14401 * Remove the `Ascii` type and associated traits: `AsciiCast`, `OwnedAsciiCast`, `AsciiStr`, `IntoBytes`, and `IntoString`. * As a replacement, add `.is_ascii()` to `AsciiExt`, and implement `AsciiExt` for `u8` and `char`. [breaking-change]
Implements [RFC 486](rust-lang/rfcs#486). Fixes#19908. * Rename `to_ascii_{lower,upper}` to `to_ascii_{lower,upper}case`, per #14401 * Remove the `Ascii` type and associated traits: `AsciiCast`, `OwnedAsciiCast`, `AsciiStr`, `IntoBytes`, and `IntoString`. * As a replacement, add `.is_ascii()` to `AsciiExt`, and implement `AsciiExt` for `u8` and `char`. [breaking-change]
Move the
std::ascii::Asciitype and related traits to a new Cargo package on crates.io, and instead expose its functionality foru8,[u8],char, andstrtypes.Rendered