Welcome to the 89th issue of Swift Weekly Brief! This week was more calm, no news explosions. The repositories and mailing lists had their usual activity.
Interested in sponsoring Swift Weekly Brief? Learn more here.
Starter tasks are a great way to get started with contributing to Swift. Ask questions directly in the bug reporting system, and get feedback when you submit your pull request.
- SR-5996: Improve compiler error with a fix-it: Cannot assign to value,
update-checkout --tagsshould fetch –tags before attempting to find a tag
- SR-5983: Unused result warning phrasing is worse for closures than normal functions
didSetcauses unwanted calls to getter even when
In Episode 30 Jesse and JP welcome Mike Ash to discuss weak references and the implementation changes that shipped in Swift 4.
News and community
This week was Clang’s 10th anniversary! 🎉 🎊
Mike Ash wrote a great Friday Q&A about the changes in Swift’s weak references implementation. (This is the post he discussed on Swift Unwrapped.)
Weak references are an important language feature. Swift’s original implementation was wonderfully clever and had some nice properties, but also had some problems. By adding an optional side table, Swift’s engineers were able to solve those problems while keeping the nice, clever properties of the original. The side table implementation also opens up a lot of possibilities for great new features in the future.
Ahmed Sulaiman wrote a descriptive blog post: Debugging Swift code with LLDB about using lldb in general and some unpopular tricks with Swift debugging. Take this chance to enhance your debugging skills!
Russ Bishop shared the problem behind the Xcode 9 simulator’s very slow performance — surprising bug!
Commits and pull requests
Jordan Rose merged a pull request for a Swift compiler crash fix where Swift didn’t handle cases of Objective-C inheritance from a
typedef for a class/protocol composition as shorthand for inheriting from the class and adopting the protocol.
No updates on proposals this week. As always, you can check out the Swift Evolution status page for all the details.
It is common to want to remove all occurrences of a certain element from a collection. This proposal is to add two in-place
removealgorithms to the standard library, which will remove all entries in a collection in-place matching either an
Equatablevalue, or match that a certain criteria.
Finally — tl;dr slicing a CoW should result in fillet mignon not ground chuck.