Learn what's new in Swift 4.1 with a playground
About 1 min
Learn what's new in Swift 4.1 with a playground 관련
Swift > Article(s)
Article(s)
Learn what's new in Swift 4.1 with a playground – Hacking with Swift
See the code, run the code, edit the code
Previously I wrote about the new features in Swift 4.1, but it's a lot more fun to see things in action and experiment yourself.
So, I just released an Xcode playground that demonstrates the new features introduced in Swift 4.1, complete with examples that I hope make them easy to understand and apply in your own work:
- Synthesized
Equatable
andHashable
- Key decoding strategy in
Codable
- Conditional conformances
- Recursive constraints on associated types
- Build configuration import testing
- Target environment testing
flatMap()
is now (partly)compactMap()
Info
The playground is available on GitHub, so I hope you'll try it for yourself:
I should add that the task of building this playground was made much easier thanks to previous work done by Ole Begemann.