-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[FR] Allow more Unicode characters from Ps
and Pe
categories for identifiers
#48885
Comments
There are a number of bracket-like characters in unicode. I think these are best saved for bracket-like delimiting functionality, rather than being used for identifiers. For example, like
for my own custom types. This would not be possible if the characters are used in identifiers. Moreover, even though there are many of these brackets, it will be confusing to read if different brackets are lexed differently. |
I see, thanks for commenting, could you post a contained working example that can be pasted in the REPL ? |
The counterargument to this would be allowing more of these as actual operators. |
While potentially useful, it's rather hard to see the type of bracket where I copied from (at least with the dark-mode I have on). For some reason now much clearer when I've copy-pasted. Still I know of these alternatives, to people not knowing of them, might be too similar to the regular { and }. |
Following the discussion on discourse I would like to propose to add more Unicode characters to the
julia
subset of identifier characters.My initial failing example is:
The opening characters come from the Open Punctuation (Ps) category and the closing ones from Close Punctuation (Pe) category. I understand that we wish to reserve characters for potential future operator and be conservative, so I'm only selecting a subset of the
Ps
andPe
categories as proposal.For [1], the term "Mathematical" in the Unicode name suggests some syntax closer to paper written equations, thus supporting these characters from the Miscellaneous Mathematical Symbols-A Unicode block:
For [2], I would propose the following subset from the Miscellaneous Mathematical Symbols-B Unicode block:
I'm thus opening this issue to discuss whether it might be acceptable to support these characters in variable names.
The text was updated successfully, but these errors were encountered: