–> Modern
1) Closures unified with function pointers
2) Tuples and multiple return values
3) Generics This is a huge one. Swift supports generic classes and functions.
4) Fast and concise iteration over a range or collection
5) Structs that support methods, extensions, protocols
6) Functional programming patterns, e.g.: map and filter
7) Operator overloading. I imagine this one will be controversial.
8) Explicit optional. Swift makes optional values a first-class language construct, and requires that any optional type be explicitly marked as such.
9) Type inference. Static typing is nice, but it can lead to painful redundancy in code.
–> Interactive Playgrounds
1) Design a new algorithm, watching its results every step of the way
2) Create new tests, verifying they work before promoting into your test suite
3) Experiment with new APIs to hone your Swift coding skills
–> Read-Eval-Print-Loop (REPL)
–> Designed for Safety
–> Fast and Powerful
Leave a comment