[swift-evolution] Prohibit invisible characters in identifier names

Xiaodi Wu xiaodi.wu at gmail.com
Mon Jun 20 17:34:56 CDT 2016


On Mon, Jun 20, 2016 at 5:20 PM, João Pinheiro <swift-evolution at swift.org>
wrote:

>
> > 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.
>

I'm not entirely sure about automatic aliasing either. But I will boldly
claim that "most people" who choose v and nu for distinct variables don't
walk into that situation with expectations of sanity.


>
> João Pinheiro
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160620/f54f03b4/attachment.html>


More information about the swift-evolution mailing list