[EXTERNAL] Re: Basic Unicode character/string support absent even in modern C++
Tom Honermann
tom at honermann.net
Thu Apr 23 15:44:08 CDT 2020
On 4/23/20 4:24 PM, Murray Sargent wrote:
>
> I write a lot of C++ code to process math text and use the Visual
> Studio C++ and clang compilers to compile for Win32, Mac, iOS, and
> Android platforms. These compilers support UTF-8 strings, literals and
> comments. They even allow math italic characters like 𝑎 (U+1D44E) to
> be used as variables! Using real math symbols instead of notation like
> 0x222B makes the code so much more readable. It’s easy to have
> Devanagari string constants, braille constants (see Unicode 2800
> block), etc.
>
There is a proposal in action to place new restrictions on what
characters can be used in identifiers following the guidelines in UAX
#31 <https://unicode.org/reports/tr31/>. Follow the progress of P1949
<https://wg21.link/p1949> if you are interested (monitoring the SG16
mailing list and meeting notes (see
https://github.com/sg16-unicode/sg16) is one way to do so). It is
*possible* that some of the identifiers you've been using may become
invalid if that proposal is adopted.
>
> C++ has grown up considerably past ASCII. But you still have to use
> ASCII operators such as != instead of ≠. It would be so fine if C++
> would allow standard math operators to be used as aliases for the
> ASCII operator pairs like !=, <=, >=
>
I'm not aware of any serious proposals to do so. But we are being
careful in our evaluation of P1949 to ensure that doing so will remain a
possibility in the future.
Note that P1949 will *not* allow doing something like the following.
This is to ensure the availability of ≠ for use as a future operator.
#define ≠ !=
int f(int a, int b) {
return a ≠ b;
}
Tom.
> Murray
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://corp.unicode.org/mailman/private/unicode/attachments/20200423/22d0c910/attachment.htm>
More information about the Unicode
mailing list