- Availability checking : – great for using
if #availableto run version-specific code in small blocks. - Error handling : try, catch, do and throw – it's been entirely rewritten to be modern, fast and safe, and unless you use only a small subset of the iOS APIs you're going to need to learn about it,
- The guard keyword : early returns made easy –
guardtakes anifstatement and adds extra optional unwrapping power, amongst other things. - The defer keyword : try/finally done right – if you return from a method at the end or middle, or if you exit a method by throwing an error, your deferred work will take place.
There's so much I haven't even touched on, But even though this little points is about some major new features in Swift 2.