let re = /regex/
if "xyz" =~ /regex/ { }
let maybe: String?
if maybe != nil { } // works
if maybe { } // should work :)
if !maybe { } // this too
var array = [ Int ]()
array << 123
let x = NSDate()
let tomorrow = x + 1
let nextMonth = x << 1
The String API should be much bigger. At the very least we need Int ranges and .length
. Ditto for Array and Dictionary.
If you don't put these into stdlib we'll be stuck with millions of buggy libraries as everyone tries to implement this themselves. See:
let x = 3
let y = 0.5
let z = x + y