Issue #171 22 Oct 2020
Written by: Kristaps Grinbergs
The last two weeks were somewhat slow in the Swift open source world but then Apple published yet another open-source library - Swift Service Discovery. Apart from the announcement of the new iPhones we had some weird times with Xcode 12.1 and 12.2 beta 3 🤔.
To continue sending out this newsletter to your emails, we are looking for sponsors to cover the cost of the platform we are using. More info about that can be found here. Or you can reach out to me personally on Twitter @fassko. Thanks! 🙏
Interested in sponsoring Swift Weekly Brief? Learn more here.
News and community
The vapor team announced notable core team changes.
Commits and pull requests
Slava Pestov merged a pull request that removes 3 of our name lookup implementations in favor of the shiny new
ASTScope, the 4th implementation to rule them all. Now, 1 is gone entirely and 1 is off by default. Also, this six-year old (!) feature request fell out easily. This fixes SR-10069.
tbkka created a pull request that replaces the current implementation of
debugDescription for the standard floating-point types with a new
formatting routine that provides both improved performance and
better results. It fixes multiple bugs - SR-106, SR-454, SR-491, SR-3131.
After its announcement almost exactly a year ago, the swift-driver project is moving full-steam-ahead towards the goal of replacing its C++ predecessor. Recent weeks saw a large amount of activity on the swift-driver repository towards achieving that goal.
This will be useful when the array is of an arbitrary length but we need at least some minimum length to work with, so padding the array with default values is a conventional way to handle such a scenario.
let arr = [10,20,30] let res = arr.padding(repeating: 0, inLength: 7) print(res) // -> [10,20,30,0,0,0,0]
When Swift’s type inference is unable to work out the type of a particular expression, it requires the programmer to provide the necessary type context explicitly. However, all mechanisms for doing this require the user to write out the entire type signature, even if only one portion of that type is actually needed by the compiler.
Swift-evolution thread: Partial type annotations
Imagine doctors being like “side project checkkkkk 🥼😷👩⚕️”