-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Remove \xXX
char escapes from the language
#12769
Comments
Closing, this was previously decided in #2800 to be working as intended. |
#2800 was about changing But this issue is separate; it's about removing So in aggregate it's worse than useless, it's a net negative. It addresses no use case and provides no benefit but comes with a cost; the only thing it does successfully is confuse users coming from Rust's primary market, C & C++ developers. I honestly can't see why it's being kept. |
I'm strongly in favor of a modified form of this, where we allow Keeping If we restrict it to ASCII characters now, that also makes the behavior of the proposed byte string literals (rust-lang/rfcs#69) make more sense, where |
I am in favour of restricting it for non-bytestring-literals also. |
This is surprising, I assumed this was only a byte literal. I agree with @kballard here. |
As I mentioned on rust-lang/rfcs#69, I agree with @kballard's proposal. |
This issue has been moved to the RFCs repo: rust-lang/rfcs#312 |
\xXX
is very misleading in Rust since it actually works exactly like\u00XX
instead of the way it works in C, C++ and other languages. Example:I understand the reasoning behind this (Rust strings are always UTF-8), but then
\xXX
shouldn't exist in the language. It brings nothing but confusion and it's functionality as implemented is the same as\u00XX
.The text was updated successfully, but these errors were encountered: