Swift 5 Released!

Swift 5 Released!

Swift 5 is a major milestone in the evolution of the language. Thanks to ABI stability, the Swift runtime is now included in current and future versions of Apple’s platform operating systems: macOS, iOS, tvOS and watchOS. Swift 5 also introduces new capabilities that are building blocks for future versions, including a reimplementation of String, enforcement of exclusive access to memory during runtime, new data types, and support for dynamically callable types.

You can try out some of the new features in this playground put together by Paul Hudson.

Language Updates

Stable ABI and Binary Compatibility

The ABI is now declared stable for Swift 5 on Apple platforms. As a result, the Swift libraries are now incorporated into every macOS, iOS, tvOS, and watchOS release going forward. Your apps will be easier to build and smaller because they won’t have to include those libraries.

See these blog posts for more details:

Standard Library Updates

The standard library in Swift 5 includes the following new features:

  • String reimplemented with UTF-8 encoding which can often result in faster code (See the UTF-8 String blog post for more background on this change)
  • Improved support for raw text in string literals (See the String Literals blog post for more background on this refinement)
  • Result and SIMD vector types added to the Standard Library
  • Enhancements to String interpolation, adding more flexibility to construct text from data
  • Performance improvements to Dictionary and Set

Swift 5 implements the following Standard Library proposals from the Swift Evolution process:

Up Next
    Ebook Download
    View all
    View all