What’s New in Swift 4?
Learn about what is new in Swift 4. By Eric Cerney.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
What’s New in Swift 4?
30 mins
- Getting Started
- Migrating to Swift 4
- API Changes
- Strings
- Dictionary and Set
- Private Access Modifier
- API Additions
- Archival and Serialization
- Key-Value Coding
- Multi-line String Literals
- One-Sided Ranges
- Generic Subscripts
- Miscellaneous
- MutableCollection.swapAt(_:_:)
- Associated Type Constraints
- Class and Protocol Existential
- Limiting @objc Inference
- NSNumber Bridging
- Swift Package Manager
- Still In Progress
- Where to Go From Here?
Still In Progress
At the time of writing this article, there are still 15 accepted proposals in the queue. If you want a sneak peak on what's coming down the line, check out the Swift Evolution Proposals and filter by Accepted.
Rather than walking through them all now, we'll keep this post updated with each new beta version of Xcode 9 .
Where to Go From Here?
The Swift language has really grown and matured over the years. The proposal process and community involvement has made it extremely easy to keep track of what changes are coming down the pipeline. It also makes it east for any one of us to directly influence the evolution.
With these changes in Swift 4, we're finally getting to a place where ABI stability is right around the corner. The pain of upgrading Swift versions is getting smaller. Build performance and tooling are vastly improving. The use of Swift outside the Apple ecosystem is becoming more and more viable. And to think, we're probably only a few full rewrites of String
away from an intuitive implementation ;].
There's much more to come with Swift. To keep up-to-date with all the changes going on, make sure to check out the following resources:
What are your thoughts on Swift 4? What's your favorite change? What do you still want to see out of the language? Did you find something new and exciting that wasn't covered here? Let us know in the comments below!