www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14658] New: Allow half-width katakana in identifiers

https://issues.dlang.org/show_bug.cgi?id=14658

          Issue ID: 14658
           Summary: Allow half-width katakana in identifiers
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: naptimeentertainment gmail.com

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?)

--
Jun 05 2015