[rust-dev] Unicode identifiers

Florian Weimer fw at deneb.enyo.de
Sun Feb 27 03:14:42 PST 2011


* Igor Bukanov:

> With most fonts it is not possible to see that the following ES
> fragment should alert 1, not 2. I guess such problems are not
> considered high on the list of language designs.
>
> javascript:var a = 1; а = 2; alert(a);

Same problem with ASCII and some fonts:

  javascript:var l = 1; I = 2; alert(l);

(Gill Sans comes to my mind, but probably no one uses that for
programming.)

AI05-0227-1 is relevant in this context because it shows the
difficulties that come with non-ASCII identifiers in some contexts:

<http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0227-1.txt?rev=HEAD>

To my knowledge, no Ada implementation makes a decent attempt at
getting this right.  There does not seem to be much commercial demand,
so compiler vendors have different priorities.


More information about the Rust-dev mailing list