After some time off and a break from the weekly, I’m back! Before we get started, I’d like to send a final massive thanks to the other Swift Weekly writers and contributors for doing such a great job the past few weeks. This team is great and they worked super hard to bring you the best Swift news, and even helped with this issue. Alright — let’s get to it!

Swift Unwrapped

In Episode 18: Community Open Source Spotlight, JP and I take a break from Swift itself to shine the spotlight on the open source community and highlight some lesser-known open source Swift projects.

News and community

Ole Begemann was kind enough to write up part of Chris Lattner’s commentary from the WWDC Swift Panel a few weeks ago. Swift’s long-term plan is exciting! You can read the Hacker News thread for even more commentary and discussion.

Ben Scheirman wrote a great post that looks at Swift’s new Encoder/Decoder implementation, focusing on JSON parsing.

Simon Gladman’s Core Image for Swift book is now free! 👍

Chris Eidhof wrote a post where he refactors an asynchronous view controller using the reducer pattern.

LLVM’s bug tracker now has a “beginner” keyword. If you’re a new contributor to LLVM, it’s easier than ever to find and tackle these more beginner-level bugs. The Swift compiler uses a great deal of LLVM’s functionality, so contributing to LLVM helps Swift too!

Commits and pull requests

Bartek Chlebek merged an implementation of JSONEncoder in corelibs-foundation so that it’s available on Linux, not just Darwin. (SR-5195)

Jordan Rose fixed a bug with class members marked @objc that avoids building conformance lookup tables unnecessarily.

Joe Groff opened a pull request to implement handling generic computed properties in Swift’s new KeyPaths.

Itai Ferber opened a pull request with a workaround for conditional conformance in the new JSONEncoder. This addresses SR-5206, which describes a situation where the encoded results could be different depending on which Container.encode method is called.

Itai Ferber also submitted a fix for an issue where the generated CodingKeys type is not available in function signatures. (SR-5215)

Joe Groff fixed a compiler crash when a key path literal was used in an expression with Any or AnyObject contextual type.


No updates on proposals this week! As always, you can check the status page for details.

Mailing lists

The mailing lists were much more quiet than usual this week! I guess developers are too busy playing with the new SDKs, filing radars for Xcode 9, and getting their apps ready for the new OS releases. The Core Team is certainly busy fixing bugs and polishing Swift 4.

Soroush Khanlou pitched an idea for a new guard/catch construct in the language. You can find a draft in this gist.

This proposal introduces a guard/catch statement to Swift. This statement is congruent to the existing guard/else statement while adding error catching support.

Swift’s native error handling mechanisms are powerful and convenient when the user works in a throwing context, such as functions and closures that can throw. Outside a throwing context, the user’s only recourse is to use Swift’s do/catch syntax to catch, pattern match, and handle thrown errors.


Finally home after two weeks…