Swift is a new programming language developed by Apple Inc for iOS and OS X development. Swift is simple and adopts secure programming patterns and adds modern features of programming. Without the constraints of C compatibility. Swift uses the same runtime as the existing Obj-C system on Mac OS and iOS. Swift is Apple’s new language for developing apps for iOS and Mac OS, and it is destined to become the foremost computer language in the mobile and desktop space.
The first public release of Swift was released in 2010. It took Chris Lattner almost 14 years to come up with the first official version, and later, it was supported by many other contributors.
Characteristics of Swift
- Swift provides modern programming features.
- Swift gives the formation of C and syntax of Objective-C.
- Swift code is simple to read and understand.
- Swift gives a fantastic way to code IOS and OS X apps.
- Swift makes use of safer programming patterns.
- Swift comes with a playground feature where Swift programmers can write their code and execute it to see the results immediately.
- Swift provides seamless access to existing Cocoa frameworks.
- Swift unifies the procedural and object-oriented portions of the language.
- Swift does not need a separate library import to support functionalities like input/output or string handling.
A Tour with Swift
The first program using this new language should print the words ‘Hello’ and ‘World’ which can be written is Swift in a single line like this: