Apple Shares Plans for Swift 4.0
Get ready to meet the forthcoming version of the language Swift 4.0 developed by Apple company. After releasing version 3.0, the next version 4.0 is expected to be released next year.
The upgrade will range from resilience to memory ownership model to strings, with special focus on source stability for code and ABI stability for the standard library, as provided by documentation in GitHub.
To this effect, according to the plan, the Swift 4 release is divided into two steps. Firstly, Apple will consider those features that don’t impact on fundamental changing of the ABI of existing features in the language to a considerable degree.
Top-priority features corresponding to step 1 goals include accommodations to support code bases targeting different language versions, so Swift can deliver on source compatibility goals while progress goes on.
Another feature of step 1 is the resilience that can make APIs evolve while maintaining a stable ABI. Apple is looking for resilience that would eliminate the fragile base class problem that fairly often occurs in some object-oriented languages by describing types of API modifications that can be made without breaking the ABI.
It is said that Apple emphasizes generics improvements needed in the standard library. The library has several workarounds for language shortcomings, and “if the underlying language deficiencies remain, they become a permanent part of the stable ABI,” the documentation says. “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,” says 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 company claims it needs to amend code generation, notably 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 step of Swift 4.0’s development, anticipated next spring, begins when implementation of step 1 features is “cresting” and contains various large and small features.
This story was initially published by InfoWorld.