Swift is Apple’s new programming language that was introduced in June 2014. It will eventually replace Apple’s ancient Objective-C programming language for iOS native app development (and native Mac OS X applications).
Swift is a modern language that borrows the best from Java, C# and Python. Apple has optimized the Swift compiler to work with it;s core native frameowrk libraries; Cocoa and Cocoa Touch. Swift’s main features / benefits are:
- Clean and concise syntax, making the code easy read and maintain.
- Optimized compiler for high perormance.
- First class data structures; Structs, Enumerations and Objects.
- Tuples; a wrapper for multiple values and disparate data types.
- Extensions; ability to add new initializers and new variables to modify an existing class.
- Dictionaries; a container that stores multiple values of the same type.
- Inferred data types; the compiler checks data types and flags incompatibilities.
- Protocols; aka interfaces, the basic classes that define the structure for all of the functions that the classes must implement.
- Closures; ability to pass along functions as first-class objects.
- Playgrounds; interactive views in Xcode development environment that respond to code or debugger changes on-the-fly. Playgrounds use the Timeline Assistant to demonstrate the output of a line or block of code in an animated fashion.