<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Jun 21, 2016, at 12:15 PM, Xiaodi Wu via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><div><blockquote type="cite" class=""><br class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Any discussion about this ought to start from UAX #31, the Unicode consortium's recommendations on identifiers in programming languages:<br class="">
<br class="">
<a href="http://unicode.org/reports/tr31/" rel="noreferrer" target="_blank" class="">http://unicode.org/reports/tr31/</a><br class="">
<br class="">
Section 2.3 specifically calls out the situations in which ZWJ and ZWNJ need to be allowed. The document also describes a stability policy for handling new Unicode versions, other confusability issues, and many of the other problems with adopting Unicode in a programming language's syntax.<br class=""></blockquote><div class=""><br class=""></div><div class="">That's a fantastic document--a very edifying read. Given Swift's robust support for Unicode in its core libraries, it's kind of surprising to me that identifiers aren't canonicalized at compile time. From a quick first read, faithful adoption of UAX #31 recommendations would address most if not all of the confusability and zero-width security issues raised in this conversation.</div><div class=""> </div></div></div></div></div></blockquote><br class=""></div><div>+1</div><div><br class=""></div><div>-Chris</div><div><br class=""></div><br class=""></body></html>