BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Swift 4.2 Enters Final Development Stage, Paving the Way for Swift 5

Swift 4.2 Enters Final Development Stage, Paving the Way for Swift 5

Leia em Português

This item in japanese

Lire ce contenu en français

Bookmarks

With Swift 4.1 being close to its official release in Xcode 9.3, currently available in beta, the Swift team is now focusing on the next version of the language, Swift 4.2. In addition to including bug fixes and improvements to compile-time performance, the new version will further advance work on Application Binary Interface (ABI) stability.

The main rationale behind Swift 4.2 is preparing ABI stability, which will be the major goal for Swift 5. According to Apple’s language and runtimes manager Ted Kremenek, Swift 4.2 will include several under-the-hood ABI changes, many related to performance, with the goal of making them available to developers to gather feedback from them before freezing the final ABI at some point along the Swift 5 release process.

All Swift 4.2-specific work will happen inside of the swift-4.2-branch with merges from master every two weeks. From April 20 on, when the last merge from master will take place, the swift-4.2-branch will only accept select, critical fixes.

ABI stability enables binary compatibility between applications and libraries compiled with different versions of Swift and is a fundamental feature of the language for framework developers. Lack of ABI stability means binary frameworks should be released for each supported compiler version. A list of all changes that will be needed before finally locking down Swift ABI is available in the ABI Dashboard, although it does not make clear what will go into Swift 4.2 and what into Swift 5, expected for released in late 2018.

In compliance with Swift 4 primary promise, Swift 4.2 will guarantee source compatibility with previous 4.x versions, meaning that most source code that could be compiled with any Swift 4.x compiler can be compiled with the Swift 4.2 compiler. This excludes breaking changes due to bug fixes -- i.e., code that was incorrect, yet compiled successfully due to a compiler bug -- or corner cases. Specifically, the Swift 4.2 compiler will keep compatibility with Swift 3 sources using compatibility mode.

Swift 4 was released in September 2017 and aimed to improve the language and compiler performance and stability, while maintaining source compatibility. ABI stability was originally a goal for Swift 4, later deferred to Swift 5.

Rate this Article

Adoption
Style

BT