Our Blogs

Swift 5 Expected To Define New Evolution Process

August 28, 2017
1489 Views
Swift 5 Expected To Define New Evolution Process
Swift 5 is expected to ship with enhanced stability for ABI including API resilience and memory ownership. According to sources, a new evolution process is being developed to ensure Swift 5 development to focus on the goals that have been planned.

ABI stability will be a primary requirement for Swift 5. Ted Kremenek reveals that ABI stability cannot be delayed and will be the core focus for Swift 5. It is vital for not only third party framework developers but also to soften adoption inside Apple. However, the official definition of ABI stability does not include module stability, which is normally considered as a stretch goal. 

It is to be noted that the module stability is only required during the development of the code, which depends upon a binary module. Moreover, the absence of the module stability will not affect the ability to automatically load a shared library during runtime.

As a developer, you should finalize a number of low-level implementation details to get ABI stability under control. This includes generics features that are used in the standard library such as conditional conformances including recursive protocol. The reports suggest that the API resilience is developed to ensure a library API can maintain memory ownership.

The highlight of Swift 5 is source stability, which will enable the Swift 5 compiler to be backward-compatible with previous versions. The source breaking modifications will be accepted only if the actual syntax will be able to show the problems.  Furthermore, the new syntax will be improved than the current counterpart with an automated migration path for existing code. You should note that the source stability will ship with Swift 4 but it will also include code for Swift 3.

Apple has redefined the overall evolution process for Swift 5 that has been designed to minimize the risk involved with ABI stability. With effect from March 1, each proposal will need a working implementation, which includes test cases.