[swift-evolution] Prohibit invisible characters in identifier names

Chris Lattner clattner at apple.com
Tue Jun 21 23:57:03 CDT 2016


On Jun 21, 2016, at 12:15 PM, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Any discussion about this ought to start from UAX #31, the Unicode consortium's recommendations on identifiers in programming languages:
> 
> http://unicode.org/reports/tr31/ <http://unicode.org/reports/tr31/>
> 
> 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.
> 
> 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.
>  

+1

-Chris


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160621/9c75638b/attachment.html>


More information about the swift-evolution mailing list