Home United States USA — software What features to expect in Apple’s Swift 5

What features to expect in Apple’s Swift 5

223
0
SHARE

The stable ABI promised for Swift 4 is delayed a year, with string ergonomics also considered for 2018
Version 5 of Apple’s Swift language used for iOS and MacOS application development will arrive in late 2018 with ABI (application binary interface) stability in the standard Swift library a primary focus—delaying a feature originally intended for the upcoming Swift 4 release.
Locking down the ABI iin Swift 5 will mean any future compiler versions can produce binaries that conform to the stable ABI. “Once an ABI is stable, it tends to persist for the rest of the platform’s lifetime due to ever-increasing mutual dependencies, ” according to Apple documentation.
This stability only affects invariants of externally visible public interfaces and symbols. Internal conventions, symbols, and layouts can keep changing without breaking the ABI. Compilers, for example, are free to change calling conventions to internal function calls as long as public interfaces are preserved.
Decisions about the ABI are serious business, with long-term ramifications and possible limitations on how the language can evolve. But ABI stability means that operating systems can embed a Swift standard library and runtime compatible with applications build with both newer and older versions of Swift. The applications thus do not need to distribute their own copy of these libraries.
ABI stability is half of what is needed to support binary frameworks. The other half, module stability, will be a “stretch goal” for Swift 5 and may not make it into the release, Apple’s roadmap notes.
Carryover goals from Swift 4 that are prerequisites to locking down the ABI in Swift 5 include:
Aside from ABI stability, Apple expect the following improvements in Swift 5:
Tags Apple
More about Apple

Continue reading...