[swift-evolution] Prohibit invisible characters in identifier names
joao at joaopinheiro.org
Mon Jun 20 17:20:52 CDT 2016
> On 20 Jun 2016, at 22:44, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> I'm a little concerned about cases like these:
> 1D6CE ; 0076 ; MA # ( 𝛎 → v ) MATHEMATICAL BOLD SMALL NU → LATIN SMALL LETTER V # →ν→
> 1D6D2 ; 0070 ; MA # ( 𝛒 → p ) MATHEMATICAL BOLD SMALL RHO → LATIN SMALL LETTER P # →ρ→
> etc. Now, one could reasonably argue that using “𝛎” and “v” to mean
> different things in the same scope would be bad, but I'm not sure
> we really want to accept them as aliases of one another, either.
Indeed, it would be unwise to pick "𝛎" and "v" for different things within the same scope. Unicode confusables are annoying and unfortunate, but not totally unexpected. Automatic aliases for similar characters would arguably be worse since it would probably qualify as unexpected behaviour for most people.
More information about the swift-evolution