New features for developers introduces in SWIFT
- Error handling model. There are new routines to throw, catch and manage errors in Swift. These enable your code to deal with recovarable errors like “file-not-found” or network timeouts.
- Syntax improvements. Swift has syntax features that let you write more expressive code. Apple claims this will improve consistency across the language.
- Availability. Using the latest SDKs ensures you get access to new features and information about platform changes. You can now compile for an older OS and the compiler will show an error if you’re using an API that is too new. You can also wrap code so it only runs when it’s on the right OS using #available blocks.
- Protocol extensions. You can now add methods and properties to any class that conforms to a particular protocol. This will enable developers to reuse more code.
Apple has also updated Objective-C (the language that pre-dated Swift). These new features enable Objective-C and Swift to work better together. New Objective-C features include Generics, Nullability annotation and a new type of Object known as a “Kind-Of”. These new features will help Swift and Objective-C to interact.