We fly with Swift
In 2014, Apple has introduced one of the biggest updates to iOS since 2008 from a developer’s point of view. They introduced HomeKit, HealthKit, CloudKit, and many like. But the biggest surprise out of WWDC 2014 was the introduction of a brand new programming language, Swift.
Swift is a wonderful programming language that has been built from the ground up to be efficient and safe. It uses the same APIs that Objective-C does. Or, what you can do in Objective-C, you can do in Swift. It also introduces some new concepts longtime programmers will appreciate.
To better understand Swift, Apple has been conditioning us with structural improvements in Objective-C over the last few years. Objective-C improvements like code blocks, literal array, and dictionary definitions, and ARC (Automatic Reference Counting) are but a few things Apple added to Objective-C that ease the transition to Swift.
Another important pillar is branch completeness. All conditional branches, be it if or switch case must cover all conditions. This way, no code can fall through without it being covered. Missing a condition in your branch statement will be caught and generate a compile time error.
One last element of Swift’s philosophy is its preference to constants over variables.
Top Trending 2020
Mobile Application development approach