[swift-evolution] Prohibit invisible characters in identifier names

Josh Wisenbaker macshome at mac.com
Thu Jun 23 14:58:22 CDT 2016


> On Jun 23, 2016, at 3:54 PM, João Pinheiro via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> On 23 Jun 2016, at 20:43, Xiaodi Wu <xiaodi.wu at gmail.com <mailto: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.

Allowing invisibles has already resulted in being able to do things like this which is intensely confusing to say the very least. 



Josh


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160623/3c4d8b0a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Messages Image(763472166).png
Type: image/png
Size: 23442 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160623/3c4d8b0a/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4103 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160623/3c4d8b0a/attachment.p7s>


More information about the swift-evolution mailing list