Swift
Swift
USN:1MY18MCA22
EVOLUTION
Swift was introduced at Apple’s 2014 Worldwide Developers Conference. It underwent an
upgrade to version 1.2 during 2014 and a more major upgrade to Swift 2 at WWDC 2015.
Initially a proprietary language, version 2.2 was made open-source software under the Apache
License 2.0 on December 3,2015, for Apple’s platforms and Linux.Through version 3.0 the
syntax of Swift went through significant evolution,with the core team making source stability a
focus in later versions. In the first quarter of 2018 Swift surpassed Objective-C in measured
popularity.Swift 4.0, released in 2017, introduced several changes to some built-in classes and
structures. Code written with previous versions of Swift can be updated using the migration
functionality built into Xcode. Swift 5, released in March 2019, introduced a stable binary
interface on Apple platforms, allowing theSwift runtime to be incorporated into Apple
operating systems. It is source compatible with Swift 4.Swift 5.1 was officially released in
September 2019. Swift 5.1 builds on the previous version of Swift 5 by extending the stable
features of the language to compile-time with the introduction of module stability. The
introduction of module stability makes it possible to create and share binary frameworks that
will work with future releases of Swift.
WHY SWIFT
Objective-C and Swift are two main programming languages used to build iOS apps.But Swift is
considered best programming language for developing apple applications.Developers prefer
swift programming language over objective-c because of the following reasons:
1. Swift requires less code
2. Swift is safer
3. Swift is easier to read and easier to learn than Objective-C
4. Simple syntax
KEY FEATURES
Key features of swift programming language are:
1. Type Casting
2. Optional type variable in Swift
3. Tuples and multiple return values
1.TYPE CASTING
Type casting is a way to check the type of an instance, or to treat that instance as a different
superclass or subclass from somewhere else in its own class hierarchy.Type casting in Swift is
implemented with the is and as operators.