/ Swift

Evolution of the Swift language

During the years, Swift has changed a lot. In this post I'm trying to cover the whole evolution of the language. 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:

Swift 1

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.

Swift 1.1

This was a minor step forward, with failable initializers and a Swift REPL.

Swift 1.2

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:

Swift 2

Swift 2.0 was announced on Jun 8th, WWDC15 as part of the upcoming Xcode7, alongside with the new operating systems.

The major upgrades for the language are:

What's new in Swift 2:

Swift 2 was released on Sept 21, 2015, read the announcement here.

Swift was open sourced at Dec 3rd, 2015, a brand new swift.org website was made for us, the developer blog was updated with a new article for the event. The Swift repository is hosted on github.

Swift Package Manager was introduced as a brand new project for managing Swift libraries, you can read all about the SPM here. You can find the source code of Swift Package Manager on github.

Swift 2.1

Minor upgrade for the language with literals inside the Swift playground. There are a few other things as well, Erica Sadun & Russ Bishop made great summarizing articles.

Swift 2.1 was released with Xcode 7.1 on Oct 21, 2015.

Swift 2.2

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:

Swift 2.3

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.

Swift 3

This is where things are getting really Swifty. Apple traditionally announced the next major version of Swift at WWDC16.

Major changes:

  • 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.

Swift 3.1

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:

Swift 3.2

This version this is the "long-term" compatibility mode for Xcode 9, but also brought some minor changes for the language.

Swift 4

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.

Major changes:

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.

Swift Server APIs

On October 26th, 2016 a new post was published on the official website telling us that they are going to start working on a server API project for the Swift language.

The first public release (v0.1.0) was on Oct 3rd, 2017. See this tweet. You can also directly check out the github repository if you are interested in the project.

Swift 5

The future...

Evolution process

If you are interested in what's going on with Swift nowadays, you should check out the swift evolution repository on github, or you can go directly to the proposal status page on swift.org.

ABI stability

The language is evolving pretty fast, and the main goal for version 5 is the ABI stability, there is an ABI manifesto document which contains all the necessary info about reaching this goal. You can track the process on the ABI dashboard.

You can check all the version history, with release dates of Xcode on wikipedia.