Home United States USA — software Swift 5 Sets its Goals, Defines New Evolution Process

Swift 5 Sets its Goals, Defines New Evolution Process

291
0
SHARE

Expected to be released in late 2018, Swift 5 will bring ABI stability and further work on API resilience and memory ownership. A new evolution process will help ensure Swift 5 development keeps its focus on its official goals.
Expected to be released in late 2018, Swift 5 will bring ABI stability and further work on API resilience and memory ownership. A new evolution process will help ensure Swift 5 development keeps its focus on the official goals.
After being postponed in previous releases of Swift, ABI stability is now a requirement for Swift 5. ABI stability, which is crucial for third party framework developers as well as to broaden Swift adoption inside of Apple, cannot be further delayed, writes Apple engineer and Swift maintainer Ted Kremenek, and will be the central focus for Swift 5. The official definition of ABI stability for Swift 5, though, does not include module stability, which is considered a stretch goal that might not make it into the next release of the language. Module stability concerns the format of module files, which defines how the compiler represents the public interfaces of a framework. Thus, module stability is only required when developing code depending on a binary module and its unavailability will not affect the ability to load a shared library at runtime. To get ABI stability under control, a number of low-level implementation details must be finalized, including generics features used in the standard library such as conditional conformances and recursive protocol requirements; API resilience, which ensures a library API can evolve while keeping its ABI stable; and memory ownership.
Another major goal for Swift 5 is source stability, which will allow the Swift 5 compiler to accept code written with previous versions of Swift. To this end, source-breaking changes will only be accepted if the actual syntax can be shown to cause problems, the new syntax is clearly better, and there is an automated migration path for existing code. Source stability will include Swift 4 and might also include Swift 3 code.
Additional improvements to the language are planned in the area of string ergonomics to make strings easier to use and faster, improvements to the standard library, and laying the ground for a new concurrency model.
Last but not least, the evolution process for Swift 5 has been redefined to reduce the risk that too many evolution proposals could dilute the focus on ABI stability. In particular, starting March 1,2018, each new proposal will need a working implementation, including test cases. Any proposal lacking a working implementation may be submitted but will not be considered for review.

Continue reading...