Swift Programming Language

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:

  1. Clean and concise syntax, making the code easy read and maintain.
  2. Optimized compiler for high perormance.
  3. First class data structures; Structs, Enumerations and Objects.
  4. Tuples; a wrapper for multiple values and disparate data types.
  5. Extensions; ability to add new initializers and new variables to modify an existing class.
  6. Dictionaries; a container that stores multiple values of the same type.
  7. Inferred data types; the compiler checks data types and flags incompatibilities.
  8. Protocols; aka interfaces, the basic classes that define the structure for all of the functions that the classes must implement.
  9. Closures; ability to pass along functions as first-class objects.
  10. 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.