At its 2014 Worldwide Developers Conference, Apple introduced a new programming language called Swift. Swift programming languages came with features to simplify application development for macOS, iOS, watchOS and tvOS. Despite being fully interoperable with Objective-C, Swift is designed to work with Apple’s Cocoa and Cocoa Touch frameworks. Apple subsequently made Swift open source. Also, the company has been updating Swift regularly with new features and enhancements. The usage statistics posted on various website depict that Swift is currently one of the top 20 programming languages of 2017. Lets have a look at how the evolution of Swift has happened over the years.

The Evolution of Swift Programming Language

Swift 1

While introducing it in 2014, Apple described Swift as “Objective-C without the C”. Swift came with simpler syntax rules to accelerate application development for macOS and iOS. At the same time, version 1 of Swift adopted several modern programming patterns. Apple has further repaired an array of performance issues to make Swift faster than Objective-C, so it can make some sense for an app developer to shift to Swift from Objective C. Swift also came with language features to help programmers to write reliable and safe application code by eliminating common programming mistakes. At the same time, Swift also supported a number of concepts supported by Objective-C – extensible programming, dynamic dispatch and widespread late binding.

Swift 2

Apple announced Swift 2 at its 2015 WWDC. The company further reveals its plan to make Swift open source by 2016. Also, version 2 of the programming language came with an array of new language features and refinements. For instance, Swift came with a new error handling model that allowed programmers to use familiar keywords like try, catch and throw. It further added protocol extensions, and used an updated SDK.  The updated SDK helped developers to access the new features provided by each Apple platform along with monitoring platform changes. Swift 2 further worked with Apple SDK more efficiently by taking advantage of two new features provided by Objective-C – nullability annotations and generics.

Swift 3

In September 2016, Apple released Swift 3.0 with several major improvements and refinements. Apple further made several changes to the language features and standard library of the open source programming language. The company even allowed programmers to port applications written in Swift to Linux. Swift 3 required programmers to label all method parameters. The new API guidelines for the programming language further allowed programmers to shorten method names by removing unnecessary words. The programmers even had the option to use lowerCamelCase for enums and properties. Swift 3 further allowed developers to import C functions using attributes for C functions. The new language features enhanced both speed and usability of Swift programming language.

Swift 4

Apple recently announced Swift 4 at its 2017 WWDC. The latest version of the programming language uses a new codable protocol. Also, Swift 4.0 comes several new language features including multiline string literals and a new string that uses collections, along with improved dictionary functionality, and improved key paths to simplify key value pairing. It further allows iOS app programmers to initialize variable before use, check integers for overflow, check indices for out-of-bound errors, manage memory automatically, and recover from unexpected failures through controlled recovery.

Apple has strong plans for Swift and this will help in the steady evolution of Swift programming. They will keep updating Swift consistently to accelerate application development for macOS, iOS, watchOS and tvOS. The upcoming version of Swift will come with several new features and enhancements that will make it easier for programmers to avail the features provided by latest versions of Apple platforms and devices.