During the years Swift has changed a lot. In this post I'm trying to cover the whole evolution of the programming language.
What's new in Swift?
Learn what's new in Swift with hands-on code examples, all in one place and with no clutter.
Swift 5 was officially release on 25th of March, 2019. You can read the announcement on the official Swift webpage, but the main aim of this release was ABI stability.
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.
- ABI stability
- native Result type
- string enhancements
- dynamic callable types
- future enum cases
What's new in Swift 5:
The announcement was during WWDC17 (June 5th), later on Sept 19th, 2017 Apple released Swift 4, with the completely rewritten source editor for Xcode 9.
- encoding, decoding
- "brand new" strings API
- key paths
- one-sided ranges
- generic subscripts
- class and subtype existentials
What's new in Swift 4?
If you are migrating a project from Swift 3, you might experience some issues with strings, but the overall transition is way better, than it was from version 2 to Swift 3. However the migrator fails this time again, I personally don't think that tool have ever worked for anyone in the history of Swift language.
This is where things are getting really Swifty. Apple traditionally announced the next major version of Swift at WWDC16.
- NS prefix dropped in Swift foundation
- object oriented GCD API
- "decapitalized" enum cases
- consistent argument labels
- omit needless words in api methods
What's new in Swift 3?
The transition from Swift 2 was really painful, because of the big changes. If you had a project from the previous year, there was a great chance that you had to refactor the whole thing, mostly because of the breaking naming changes. Obviously the migrator was broken, like in every year.
Some small, but really nice additions were introduced for the language, like concrete constrained extensions, and nested generics. Also the availability API was extended with Swift version checkings.
What's new in Swift 3.1?
This version this is the "long-term" compatibility mode for Xcode 9, but also brought some minor changes for the language.
Swift 2.0 was announced on Jun 8th, WWDC15 as part of the upcoming Xcode7, alongside with the new operating systems.
- protocol oriented programming
- error handling model
- guard statement
- option set type
- string api
What's new in Swift 2?
Swift 2 was released on Sept 21, 2015, read the announcement here.
Swift 2.1 was released with Xcode 7.1 on Oct 21, 2015.
This release was - in my opinion - just a preparation for the future. The next major version of Swift has so many changes, that Apple needed a stable version from the language before they can break everything.
Apple made some nice improvements for selectors, they've introduced runtime Swift version checks, deprecated some C style loops & operators.
What's new in Swift 2.2?
Long term support for the 2nd major version of Swift. Even Apple has a really short release article for this version. Swift 2.3 was mostly based on the changes from 2.2.
Let's go back to the beginning of everything. The first introduction of Swift was on Jun 2th, 2014 at WWDC, when Craig Federighi told us the big news:
The first version of Swift arrived at Sept 9th, 2014, Apple made a blog post for this big event. In Xcode 6 beta 4 we've finally received access control features for the language. You can read it more about it here. Swiftdoc.org was born.
The next milestone for the language, the final version was part of Xcode 6.3 which was released by Apple back in Apr 8th, 2015.
Swift now supports building targets incrementally, i.e. not rebuilding every Swift source file in a target when a single file is changed.
The Set data type arrived, this inspired me with something:
Set data type is here (the death of foundation framework?)
The pyramid of doom was finally eliminated with the multiple optional testing feature.
Those just some of the news, but if you are interested in the list of the complete changes, you should check out these great articles.
What's new in Swift 1.2?