From: Andre Schappo <A.Schappo_at_lboro.ac.uk>
Date: Wed, 4 Jun 2014 09:28:49 +0000

Swift is Apple's new programming language. In Swift, variable and constant names can be constructed from Unicode characters. Here are a couple of examples from Apple's doc http://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html

let π = 3.14159
let 你好 = "你好世界"

I think this a huge step forward for i18n and Unicode.

There are some restrictions on which Unicode chars can be used. From Apple's doc

"Constant and variable names cannot contain mathematical symbols, arrows, private-use (or invalid) Unicode code points, or line- and box-drawing characters. Nor can they begin with a number, although numbers may be included elsewhere within the name."

The restrictions seem a little like IDNA2008. Anyone have links to info giving a detailed explanation/tabulation of allowed and non allowed Unicode chars for Swift Variable and Constant names?

André Schappo

Unicode mailing list
Received on Wed Jun 04 2014 - 04:31:19 CDT

This archive was generated by hypermail 2.2.0 : Wed Jun 04 2014 - 04:31:21 CDT