Swift Runtime Now Stable
Written by Alex Denham   
Tuesday, 02 April 2019

Apple is to include the Swift runtime in current and future versions of all its operating systems - macOS, iOS, tvOS and watchOS. The move has been made because Swift 5 has a more stable ABI.

Swift was launched by Apple in 2014 as an easier alternative to Objective C. It incorporates some of the best ideas from languages such as C# and JavaScript, and aims to be easy to use. However, until now developers have been cautious about adopting it on the principle that even Apple itself doesn't think it's stable enough to be included by default on the company's own devices.



The main highlight of the new version is the ABI stability. An Application Binary Interface (ABI) is the compiled version of an API, and it provides a way for programs to call functions and use data structures from other compiled programs. According to Swift developer Jordan Rose writing on the Swift blog:

"Swift’s ABI is currently declared stable for Swift 5 on Apple platforms. As development of Swift on Linux, Windows, and other platforms matures, the Swift Core Team will evaluate stabilizing the ABI on those platforms."

The fact the Swift libraries will now be included means your apps will be easier to build and smaller because they won’t have to include those libraries.

Alongside the ABI improvements,  Swift 5 has other improvements, including a reimplementation of String, enforcement of exclusive access to memory during runtime, new data types, and support for dynamically callable types.

This version of Swift has changed the preferred encoding of strings from UTF-16 to UTF-8. The developers say this fulfills one of String’s long-term goals to enable high-performance processing. It also lays the groundwork for providing more performant APIs in the future.

There's also improved support for raw text in string literals. This has been achieved by adding custom delimiters to string literals and escape sequences. String interpolation has also been improved, adding more flexibility to construct text from data.

Other improvements include the addition of Result and SIMD vector types to the Standard Library; and performance improvements to Dictionary and Set.




More information

Swift Org

Related Articles

Swift Adds More Generics Support

Swift 4 Improves String Handling

Swift 3.0 Released!

Apple Launches Swift Playgrounds

Apple Open Sources Swift

Apple's New Language - Swift       

Swift 2 To Be Open Source       

Top Languages 2015 - Stasis But For Go And Swift   



To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, Facebook or Linkedin.


The GeckoView Alternative To WebView

If you have used WebView in any of your Android projects, you might know that it has some limitations. Now you have a choice as GeckoView can do everything it can and more.

Microsoft Launches Azure Blockchain Service

Microsoft has announced a preview of a fully-managed blockchain service. Azure Blockchain Service is designed to make it easier to set up, manage and control consortium blockchain networks so business [ ... ]

More News





or email your comment to: comments@i-programmer.info