[swift-evolution] Prohibit invisible characters in identifier names

João Pinheiro joao at joaopinheiro.org
Thu Jun 23 14:54:11 CDT 2016


> On 23 Jun 2016, at 20:43, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
> That's cool, although my preferred solution would be more closely aligned with UAX #31: overtly disallow the glyphs in Table 4 (instead of ignoring them) except in the specific scenarios for ZWJ and ZWNJ identified in UAX #31, then afterwards internally represent the identifier as its NFC-normalized string.

Explicitly disallowing them was my initial idea, but I think it would end up being a confusing error for users to encounter. Ignoring the invisible characters and leaving it up to a linter to remove them is less likely to cause confusion for users.

I'll be sure to describe the alternative of explicitly prohibiting them in the proposal though.

Sincerely,
João Pinheiro


More information about the swift-evolution mailing list