andre
4th June 2014, 08:11 AM
Just been informed by https://twitter.com/ArmstrongAtWork that Swift (Apple's new Programming Language) Variables & Constants names can be formed from Unicode chars.
Here is a relevant extract from Apple's Swift Language Guide
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html
You can use almost any character you like for constant and variable names, including Unicode characters:
let π = 3.14159
let 你好 = "你好世界"
let = "dogcow"
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.
Anyone have further info on allowed & non allowed Unicode chars for Swift Variables & Constants names. The restrictions seems a little like IDNA2008
This is initiative is big! Even the ASCII Anglo Saxons will have to switch on to Unicode:)
André 小山 Schappo
Here is a relevant extract from Apple's Swift Language Guide
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html
You can use almost any character you like for constant and variable names, including Unicode characters:
let π = 3.14159
let 你好 = "你好世界"
let = "dogcow"
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.
Anyone have further info on allowed & non allowed Unicode chars for Swift Variables & Constants names. The restrictions seems a little like IDNA2008
This is initiative is big! Even the ASCII Anglo Saxons will have to switch on to Unicode:)
André 小山 Schappo