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.

swiftlogo

 

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.

 

swiftlogo

 

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.

Banner


Mastering LLMs With Experts
22/10/2024

A freely available set of workshops and talks on the essentials of LLMs, taught by practitioners. The topics include Evals, Retrieval-augmented-generation (RAG), Fine-tuning etc.



Ai-Da's Portrait of Alan Turing At Auction
01/11/2024

Sotheby's Digital Art Day Action, now underway, features a large-scale portrait of  Alan Turing created by Ai-Da, the humanoid robot artist whose work, including this canvas, was exhibited at the [ ... ]


More News

espbook

 

Comments




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