Apple has released Swift 3.0 after much anticipation to deliver an advanced version of its complied programming language. While this new update is touted to be a “source-breaking” release with many new changes, it is not source-compatible with Swift 2.2 and 2.3.
“Swift 3 is a huge release containing major improvements and refinements to the core language and Standard Library, major additions to the Linux port of Swift, and the first official release of the Swift Package Manager,” said Ted Kremenek, senior manager of languages and runtimes, Apple, in a blog post.
The first major change that Swift 3 includes is the better translation of Objective-C APIs. This helps developers import codes from Objective-C and then use them directly on Swift. Although the new improvement would influence some open source enthusiasts to test their coding on the updated platform, codes that were previously imported from Objective-C will not work in the latest Swift version.
In addition to the improved transition, Apple has tweaked the testing procedure of the language to deliver an easy solution to review packages. There is a single syntax to execute all tests at once.
The next significant change is the application of API guidelines to Swift’s standard library. Developers need to translate their Swift 2 code into Swift 3 to use references from the standard library.
Code migration tool
As most of the features in Swift 3 require the transition of codes, Apple has added a native code migrator within Xcode 8.0. This tool is claimed to automatically handle several source changes. A migration guide has also been released to ease the switching process.
Swift 3 appears to be the biggest push by Apple to attract hundreds and thousands of developers. It multi-paradigm capabilities to offer cross-platform developments across iOS, macOS, watchOS, tvOS and Linux. Additionally, a GitHub repository is available to give an in-depth view of the code construction for the young language.