Swift has been out for months and has not really cared about swift, apart from sharing a bit of knowledge with colleagues. The learning of SWIFT data compiled on GitHub is still good, and is now available in E-book and PDF format.
Swift's syntax is still very different from the language syntax we normally develop, and Swift does not need to be written; The Terminator, the variable declaration, can be used without specifying the type. It's pretty cool to see the code effects written immediately below the playground.
Due to the limited time of the day, only a little slowly understand.
var and let
Both are declared variables, but let's declare a variable that can only be assigned once, like our const.
If Else
1 if { println ("YES")}
If the contents of the content must be Boolean expressions , we develop a language that basically supports the IF TMP {...}, but Swift does not support, if this write will be an error. The curly braces that follow the If are also required.
Optional values
" A " if optional = = Nil { println ("YES"else { println ("NO")}
An optional value indicates that the variable has a specific value or nil. What if you don't add it back? Indicates an optional, the above code will be an error. It may be that Swift has done the next processing of nil, possibly to achieve the corresponding protocol;
Start the Swift learning path