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

Deprecate octal escape literals #7292

Closed
scabug opened this issue Mar 24, 2013 · 4 comments
Closed

Deprecate octal escape literals #7292

scabug opened this issue Mar 24, 2013 · 4 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Mar 24, 2013

We already got rid of octal literals and octal escape literals are even more obscure and misleading for unaware readers.

Considering that we live in a Unicode world, the usefulness of special syntactical shortcuts for characters between 0 and 255 is greatly diminished.

Fixing this issue involves adding a deprecation warning/error to the scanner and updating the spec (remove "A character with Unicode between 0 and 255 may also be represented by an octal escape, i.e. a backslash ‘’ followed by a sequence of up to three octal characters." from "1.3.6 Escape Sequences" and " or the octal escape '\12'" from "1.3.4 Character Literals").

@scabug
Copy link
Author

scabug commented Mar 24, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7292?orig=1
Reporter: @soc
Affected Versions: 2.11.0-M2

@scabug
Copy link
Author

scabug commented Mar 24, 2013

@soc said:
Code-wise, https://github.com/soc/scala/compare/SI-7292 is pretty much all what would be needed (+ tests).

@scabug
Copy link
Author

scabug commented Mar 25, 2013

@Blaisorblade said:
See also https://groups.google.com/d/topic/scala-internals/bxmRdZFpFDo/discussion. In the end, you got my vote.

@scabug
Copy link
Author

scabug commented Jun 21, 2013

@adriaanm said:
scala/scala#2342

@scabug scabug closed this as completed Jun 21, 2013
@scabug scabug added this to the 2.11.0-M4 milestone Apr 7, 2017
eed3si9n added a commit to eed3si9n/scala that referenced this issue Feb 16, 2018
Ref scala#2342
Ref scala/bug#7292

This removes octal escape in String literals, which was deprecated in 2.11 and removed under -Xfuture. As part of the effort to move away from -Xfuture flag, I am removing it here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants