Skip to content
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

Restrict "\xXX" to ASCII (0x00 -- 0x7F) #326

Merged
merged 5 commits into from
Oct 15, 2014

Conversation

pnkfelix
Copy link
Member

Attempted to make it clear, however, that the prior discussions were
really in a different context, namely when we were trying to resolve
the question "does \xXX denote a code *unit* or a code *point*."

This RFC is proposing a way to side-step that question entirely, at
least in the context of string literals.  (I'll leave aside the
question of if we are really side-stepping it, given our treatment of
byte-string literals.)
@pnkfelix pnkfelix changed the title Restrict xXX to ascii Restrict xXX to ASCII (0x00 -- 0x7F) Sep 26, 2014
These admittedly weaken my "source of confusion" argument.
Nonetheless, I still think the case for `\xXX` for `XX > 0x7F` is
weak.
@Kimundi
Copy link
Member

Kimundi commented Sep 26, 2014

+1, this is the conservative, consistent choice.

And even if in the future people want to change or revert this change again, it would be backwards compatible because you can extend the semantic of ASCII-only \xXX to both "code unit" and "code point".

@pnkfelix pnkfelix changed the title Restrict xXX to ASCII (0x00 -- 0x7F) Restrict "\xXX" to ASCII (0x00 -- 0x7F) Sep 26, 2014
@aturon aturon merged commit 90be0fb into rust-lang:master Oct 15, 2014
withoutboats pushed a commit to withoutboats/rfcs that referenced this pull request Jan 15, 2017
@Centril Centril added A-syntax Syntax related proposals & ideas A-expressions Term language related proposals & ideas labels Nov 23, 2018
wycats pushed a commit to wycats/rust-rfcs that referenced this pull request Mar 5, 2019
* rfc text

* add date

* fix sp

* fix word

* add deprecation target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-expressions Term language related proposals & ideas A-syntax Syntax related proposals & ideas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove \xXX char escapes from the language
4 participants