7. And Swift
//ex1
let aPoint = CGPointMake(9.0, 10.0)
//or equivalently:
let aPoint: CGPoint = CGPointMake(9.0, 10.0) //ex2
var aView = UIView()
//or equivalently:
let aView: UIView = UIView()
3 characters
7
8. And Swift
//ex1
let aPoint = CGPointMake(9.0, 10.0)
//or equivalently:
let aPoint: CGPoint = CGPointMake(9.0, 10.0) //ex2
var aView = UIView()
//or equivalently:
let aView: UIView = UIView()
3 characters
8
Swift performs type checks when compiling your code and flags any mismatched types as errors. This enables you to catch and fix errors as early as possible in the development process.
14. Swift comes with many features to make your code fairly human readable:
•Closures unified with function pointers
•Tuples and multiple return values
•Generics
•Fast and concise iteration over a range or collection
•Structs that support methods, extensions, protocols.
•Functional programming patterns.
14