-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
Allow Unicode combining characters in identifiers #194
Labels
FrozenDueToAge
LanguageChange
Suggested changes to the Go language
v2
An incompatible library change
Comments
Labels changed: added language-change. Owner changed to r...@golang.org. Status changed to Thinking. |
golang-nuts thread on currently invalid identifier and combining characters: http://groups.google.com/group/golang- nuts/browse_thread/thread/13fd9002e3b029f/85e1167816017433 |
golang-nuts thread on currently invalid identifier and combining characters: http://groups.google.com/group/golang-nuts/browse_thread/thread/13fd9002e3b029f/85e1167816017433 |
So far this ticket has focused on character classes, but I'd like to call specific attention to the equivalence issues this post in the thread in #4: http://groups.google.com/group/golang-nuts/msg/8c84eb183dcb672e? I suggest that since the language specification has already broken orthogonality with the character encoding (as it rather must, anyway) and since the encoding of choice is Unicode, it would not be inappropriate to finish what has been started as far as Unicode-awareness. Define whitespace as General_Category Zs, Zl and Zp (or alternatively, Bidi_Class WS, B and S to allow non- breaking spaces within tokens) and compare tokens (or at least identifiers) in NFKD form. I can still see narrowing the identifier definition even further, to exclude non-idiomatic naming practices. |
Doing this "right" involves full canonicalization, which is not a well-defined concept yet. As the FAQ entry states, it's premature to address this issue in Go at the moment. The current situation is far from perfect but is an improvement from ASCII and permits expansion to a larger space of identifiers once things settle in the Unicode standard. Until then, the current design remains clear and straightforward, if limiting. Status changed to WontFix. |
Sigh. And here, I was thinking, I could write code in Hindi.
Doesn't work at all.
|
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
LanguageChange
Suggested changes to the Go language
v2
An incompatible library change
by jjc.jclark.com:
The text was updated successfully, but these errors were encountered: