Bug 14658 – Allow half-width katakana in identifiers

Status
NEW
Severity
enhancement
Priority
P5
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-06-06T00:48:03Z
Last change time
2024-12-13T18:43:12Z
Assigned to
No Owner
Creator
naptime
Moved to GitHub: dmd#18999 →

Comments

Comment #0 by naptimeentertainment — 2015-06-06T00:48:03Z
Most Japanese is allowed in D source code, but half-width katakana is not supported (U+FF61..U+FF9F, inclusive). Half-width katakana was designed for programming use (dating back to when text-mode terminals required all characters to have the same width, and a half-width version of Japanese katakana was created to match the Latin characters used in ASCII). I'm not sure why it did not make the table in Annex D of the C99 standard (I just checked -- it is not listed there), but I think half-width katakana is an important set of characters to support in D since it allows for compact (space-saving) identifiers in Japanese. I understand that compatibility with C is important, but it is my understanding of the C99 standard that "universal character names for identifiers" are not necessarily encoded in plain Unicode anyway -- from footnote 60 of the standard (ISO/IEC 9899:TC2 WG14/N1124 ยง6.4.2.1-3, page 51): "On systems in which linkers cannot accept extended characters, an encoding of the universal character name may be used in forming valid external identifiers." Please add the following character range to the character ranges supported by D for use in identifiers: U+FF61 to U+FF9F := half-width katakana // (Also: Does "P5" mean the lowest priority or the highest priority?)
Comment #1 by dlang-bugzilla — 2015-06-06T00:52:07Z
(In reply to naptime from comment #0) > // (Also: Does "P5" mean the lowest priority or the highest priority?) Lowest priority, but we don't pay attention to the priority field much. The severity (enhancement/minor/etc.) is more important.
Comment #2 by naptimeentertainment — 2015-06-06T01:59:08Z
I copied the unicode range incorrectly, sorry. It should be: U+FF65 to U+FF9F The range I typed in my original post includes a few punctuation characters that I didn't mean to be included. (In reply to Vladimir Panteleev from comment #1) > Lowest priority, but we don't pay attention to the priority field much. The > severity (enhancement/minor/etc.) is more important. Thank you!
Comment #3 by robert.schadek — 2024-12-13T18:43:12Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18999 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB