Skip to content

An Xcode playground that demonstrates the new features introduced in Swift 5.0.

Notifications You must be signed in to change notification settings

SwiftPeerLabSydney/whats-new-in-swift-5-0

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What’s new in Swift 5.0?

This is an Xcode playground that demonstrates the new features introduced in Swift 5.0:

  • Raw strings
  • A standard Result type
  • Customizing string interpolation
  • Dynamically callable types
  • Handling future enum cases
  • Flattening nested optionals resulting from try?
  • Checking for integer multiples
  • Counting matching items in a sequence
  • Transforming and unwrapping dictionary values with compactMapValues()

This is designed to complement my existing article What’s New in Swift 5.0. You might also want to read What’s New in Swift 4.2 and What's New in Swift 4.1. Alternatively, I have a whole website dedicated to tracking what's new in Swift – you should check it out at https://www.whatsnewinswift.com.

If you hit problems or have questions, you're welcome to tweet me @twostraws or email [email protected].

Note: Until a version of Xcode ships with Swift 5.0, you should download the latest Swift trunk development snapshot and activate it inside your current Xcode version.

Screenshot of Xcode 10.1 running this playground.

About

An Xcode playground that demonstrates the new features introduced in Swift 5.0.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%