-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve support for Unicode supplementary characters in identifiers and string interpolation (as in Scala 2) #16278
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@som-snytt merge conflict needs resolving My only other concern before hitting "merge" is to ask whether you looked at whether |
It looks like the fix on Scala 2 had no impact on the spec because it's "Unicode." |
fd55801
to
0d03922
Compare
Could |
In what context? is it punctuation? Not every character is accepted everywhere. Arbitrary identifiers:
Also, not on my keyboard. |
I guess every five days there is a conflicting push to Scanners. |
0d03922
to
22f11cd
Compare
Yes, the the section sign is in the "punctuation" category. So are |
To clarify Laminar's use case – we tend to prefix variable and method names with
This convention arose because I suggest that it would be useful to allow some "keyboard-typeable" special character to be used as a prefix (or alternatively, as a suffix) to identifiers like variable and method names, and if that's not feasible, to perhaps allow characters like We only point to |
That's an interesting use case. I'd suggest https://github.com/lampepfl/dotty-feature-requests Alternatively, maybe leading dollar is OK for certain members. A linter could flag violations. That might be an intermediate ground. |
I was thinking about the Laminar case lately, and IMO a good solution would be to use the IDE's capabilities instead of a prefix. This would eliminate the need for a specific naming convention, and would be customizable to better suit the users' needs. |
Forward port scala/scala#9805
Fixes #16271