<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>+1</div><div id="AppleMailSignature">I didn't even know there were any invisible characters until this thread came up.</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">- Dave Sweeris</div><div><br>On Jun 23, 2016, at 15:13, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 23, 2016 at 2:54 PM, João Pinheiro <span dir="ltr">&lt;<a href="mailto:joao@joaopinheiro.org" target="_blank">joao@joaopinheiro.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><br>
&gt; On 23 Jun 2016, at 20:43, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com">xiaodi.wu@gmail.com</a>&gt; wrote:<br>
&gt; 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.<br>
<br>
</span>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.<br>
<br>
I'll be sure to describe the alternative of explicitly prohibiting them in the proposal though.<br></blockquote><div><br></div><div>I would strongly urge you to propose explicitly prohibiting them just as UAX #31 recommends. Their reasoning is that these characters, which include those that reverse text direction or control joining, can cause one identifier to be maliciously changed to look like another. If you ignore these characters instead of prohibiting them, an identifier that visually appears as one string could in fact be a different one to the compiler.</div><div><br></div><div>Moreover, a compiler error can be made helpful by saying that the offending character is potentially invisible and it can come with a fix-it to remove the offending character. I don't think that would confuse the user at all. It would be more confusing if invisible characters that caused one thing to look identical to another were silently permitted.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Sincerely,<br>
João Pinheiro</blockquote></div><br></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>