I made an Xcode playground that lets you try out many of the new features coming in Swift 4. You can download it on GitHub.

The cool thing is that you can run the playground right now in Xcode 8.3; you don’t have to wait for the first official Swift 4.0 beta, which will probably come as part of Xcode 9 at WWDC. All you need to do is install the latest Swift snapshot from swift.org (don’t worry, it’s easy).

Toolchain installation

Go to the snapshots download page on swift.org and download the latest snapshot for Xcode. Run the installer to install the snapshot. In Xcode, go to Xcode > Toolchains > Manage Toolchains… and select the snapshot. It might be a good idea to quit and relaunch Xcode after switching snapshots. I had occasional problems with syntax highlighting and error reporting, and a relaunch fixed them. Toolchain selection in Xcode.

I plan to keep the playground up to date over the summer as Swift 4.0 matures and more features get implemented.