It’s November! The days get shorter, and the end of year is creeping up. Swift 5 is drawing nearer. This issue is also guaranteed not to be spooky.
Interested in sponsoring Swift Weekly Brief? Learn more here.
- SR-8937 [Compiler] Switch over
T?fixit does not use syntactic sugar
- SR-8960 [Compiler] Emit a symbol reference to ensure swiftrt.o is linked on Linux/Windows
News and community
Apple released Xcode 10.1, along with Swift 4.2.1. It includes an overview of what’s new in this Swift version.
Doug Gregor and Ben Cohen’s talk on generics at WWDC has been expanded to include an all-new section on recursive constraints, associated type and protocol where clauses, and divide-and-conquer algorithms. It starts at around 33 minutes. Highly recommended; very insightful!
Commits and pull requests
The Core Team does not want to make source-incompatible changes lightly, but we also want to leave room to improve the language for future users of Swift. We don’t have a bright-line rule for when a change crosses the line to become unacceptable, but the key consideration in our analysis is the change’s apparent impact in practice on existing code more than its hypothetical risks. In this case, we are convinced that the change leads to fairly inarguably better results.
This proposal removes four customization points from protocols in the standard library:
The default implementations of these symbols will remain, so sequences and collections will continue to have the same operations available that they do today.
… and has been accepted.
The Core Team has decided to accept the proposal as written (with the refinements incorporated during the review).
Resultis considered generally useful enough to be included in the standard library. However, in the past, strenuous disagreement between the typed and untyped-throws camps has prevented consensus on the exact form it should take.
To kick off another round of discussion, and before I update my proposal officially, I’d like to discuss the form that was brought up late in the last discussion:
The proposal can be found here.
How to learn all about generics with this one easy trick!