Can NFKC turn valid UAX 31 identifiers into non-identifiers?
Philippe Verdy via Unicode
unicode at unicode.org
Thu Jun 7 05:05:20 CDT 2018
In my opinion the usual constant is most often shown as "" (curly
serifs, slightly slanted) in mathematical articles and books (and in TeX),
but rarely as "π" (sans-serif).
There's a tradition of using handwriting for this symbol on backboards (not
always with serifs, but still often slanted). A notation with the "π"
symbol uses a legacy troundtrip mapping for old OEM charsets on
low-resolution text terminals where it was distinguished from the more
common Greek letter which was enhanced for better readability once old
low-resolution terminals were replaced. "π" looks too much like an Hangul
letter or a legacy box-drawing character and in fact difficult to recognize
as the pi constant, but it may still be found in some plain-text paragraphs
of inline mathematical formulas on screens (for programmers), at low
resolution or with small font sizes, where most text is in sans-serif Latin
and not slanted/italicized and not using an handwritten style.
If you think about writing a functional programming language using inline
formulas, then the "π" symbol may be ok for the constant, and custom
identifiers for a function would use standard Greek letters (or other
standard scripts for human languages), or would use "pi" in Latin. You
would then write "pi(π)" in that inline formula. For a classic 2D
mathematical layout, you would use "pi()" with distinctive but
homonegeous styles for custom variables/function names and for the classic
As much as possible you will avoid mixing confusive letters/symbols in that
Confusion is still possible is you use old texts mixing old Greek letters
for numerals: you would in that case avoid using the Greek letter pi for
naming your custom function, and would reserve the pi letter for the
wellknown constant. But applying distinctive styles will enhance your
formulas for readability.
2018-06-06 23:25 GMT+02:00 Hans Åberg via Unicode <unicode at unicode.org>:
> > On 4 Jun 2018, at 21:49, Manish Goregaokar via Unicode <
> unicode at unicode.org> wrote:
> > The Rust community is considering adding non-ascii identifiers, which
> follow UAX #31 (XID_Start XID_Continue*, with tweaks). The proposal also
> asks for identifiers to be treated as equivalent under NFKC.
> So, in this language, if one defines a projection function and the
> usual constant π, what is (π) supposed to mean? - Just curious.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Unicode