Paul Krill
Editor at Large

Apple lays out plans for Swift 4.0

news
Oct 20, 20163 mins

The upcoming version of the language, due next year, emphasizes source and standard library stability

Fresh from releasing version 3.0 of its Swift language, Apple is elaborating further on plans for Swift 4.0, which is expected late next year.

The upgrade will range from resilience to memory ownership model to strings, with particular focus on source stability for code and ABI stability for the standard library, according to documentation in GitHub.

To that end, Apple is dividing the Swift 4 release into two stages. The first stage, involving source and ABI stability, will consider features that do not fundamentally change the ABI of existing features in the language or imply an ABI-breaking alteration to the standard library.

High-priority features backing stage 1 goals include accommodations to support code bases targeting different language versions, so Swift can deliver on source compatibility goals while progress continues. Also for stage 1, Apple is looking for resilience, specifically to enable APIs to evolve while maintaining a stable ABI. Resilience, for example, would eliminate the fragile base class problem that occurs in some object-oriented languages by describing types of API changes that can be made without breaking the ABI.

Apple also touched on generics improvements needed in the standard library. The library has a number of workarounds for language deficiencies, and “if the underlying language deficiencies remain, they become a permanent part of the stable ABI,” the documentation states. “Conditional conformances, recursive protocol requirements, and where clauses for associated types are known to be in this category, but it’s plausible that other features will be in scope if they would be used in the standard library.”

System programmers are seeking an opt-in Cyclone/Rust-inspired model for memory ownership models in high-performance applications. “This feature will fundamentally shape the ABI, from low-level language concerns such as ‘inout’ and low-level ‘addressors’ to its impact on the standard library,” according to the GitHub documentation. “While a full memory ownership model is likely too large for Swift 4 stage 1, we need a comprehensive design to understand how it will change the ABI.”

Apple says it needs to improve code generation, including interaction with the language’s runtime, to stabilize the ABI. “While not specifically user-facing, the decisions here affect performance and (in some rare cases) the future evolution of Swift.” The upgrade also seeks to make strings more powerful and easier to use while retaining correctness with Unicode.

The second stage of Swift 4.0’s development, anticipated next spring, begins when implementation of stage 1 features is “cresting” and contains other large and small features.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author