Unicode symbols in the identifiers

Andrey andr-sar at yandex.ru
Fri Jan 11 03:50:29 PST 2013


> According to the specification D doesn't necessarly support 
> unicode identifiers:
>
> "Identifiers start with a letter, _, or universal alpha, and 
> are followed by any number of letters, _, digits, or universal 
> alphas. Universal alphas are as defined in ISO/IEC 9899:1999(E) 
> Appendix D. (This is the C99 Standard.) Identifiers can be 
> arbitrarily long, and are case sensitive. Identifiers starting 
> with __ (two underscores) are reserved."
>
> http://dlang.org/lex.html#Identifier

http://www.algonet.se/~afb/d/universalalphas/universalalphas.html

I can't understand logic why there are such symbols allowed

µ·ʰʱʲʳʴʵʶʷʸʻʽʾʿˀˁːˑˠˡˢˣˤͺՙऽଽι‿⁀ℂℇℊℋℌℍℎℏℐℑℒℓℕ℘ℙℚℛℜℝℤΩℨKÅℬℭ℮ℯℰℱℳℴℵℶℷℸⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↀↁↂ々〆〇〡〢〣〤〥〦〧〨〩

and very useful math symbols completely ignored.

C++11 standard allows these: ²³⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉

Annex E (normative)
Universal character names for identifier
characters
[charname]

E.1
Ranges of characters allowed
[charname.allowed]
00A8, 00AA, 00AD, 00AF, 00B2-00B5, 00B7-00BA, 00BC-00BE, 
00C0-00D6, 00D8-00F6, 00F8-00FF
0100-167F, 1681-180D, 180F-1FFF
200B-200D, 202A-202E, 203F-2040, 2054, 2060-206F
2070-218F, 2460-24FF, 2776-2793, 2C00-2DFF, 2E80-2FFF
3004-3007, 3021-302F, 3031-303F
3040-D7FF
F900-FD3D, FD40-FDCF, FDF0-FE44, FE47-FFFD
10000-1FFFD, 20000-2FFFD, 30000-3FFFD, 40000-4FFFD, 50000-5FFFD,
60000-6FFFD, 70000-7FFFD, 80000-8FFFD, 90000-9FFFD, A0000-AFFFD,
B0000-BFFFD, C0000-CFFFD, D0000-DFFFD, E0000-EFFFD


More information about the Digitalmars-d-learn mailing list