Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Move unicode-escaping post-parser #7

Closed
puffnfresh opened this issue Sep 4, 2014 · 3 comments
Closed

Move unicode-escaping post-parser #7

puffnfresh opened this issue Sep 4, 2014 · 3 comments
Assignees
Milestone

Comments

@puffnfresh
Copy link

Unicode escaping currently happens before the parser, making it intractable. Unicode parsing should be handled in non-raw String literals. This would allow, for example, LaTeX commands such as "\usepackage" to be embedded within raw string literals without deliberate obfuscation.

@Blaisorblade
Copy link

👍

@soc
Copy link

soc commented Sep 4, 2014

@non
Copy link

non commented Sep 4, 2014

@soc Right, that ticket was definitely an inspiration. In my mind I wanted to do the "right" thing (from my POV) which is to remove the feature except in the cases where it is definitely needed (string and character literals).

Almost all technology is now Unicode/UTF-8 aware, and beyond that the Scala community seems to have agreed on providing alternatives to any uses of unicode in public APIs. Thus I would say that the feature (which is inherited from Java) is not worth it for us.

If there are folks who heavily rely on this feature I'd be interested to hear counter-arguments. So far everyone I've talked to has been very supportive of this change.

(EDIT: And of course, we may decide on source compatibility guidelines which are too strict to allow us to remove unicode escapes entirely. In that case, I would support a more limited hack like the one @soc proposed in the linked ticket.)

aloiscochard pushed a commit to aloiscochard/scala that referenced this issue Sep 5, 2014
Upgrade to Scala 2.11.0-M6 and mark Scala dependencies as provided.
puffnfresh pushed a commit to puffnfresh/scala that referenced this issue Jul 30, 2015
SI-6051 Test case, the issue seems to be fixed.
@milessabin milessabin added this to the Parked milestone Aug 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants