A lot has been happening in the last two weeks. I think a long intro would only distract you from all the interesting bits, so let’s get into it…

Starter tasks

  • SR-9795 [Compiler] Cannot use super in lazy property: ‘super’ cannot be used outside of class members
  • SR-9851 [Compiler] Incorrect fixit for logical NOT operator on value of Bool? type
  • TF-46 [Tests] Create unit tests for functions in TFUtilities.
  • TF-51 [Stdlib] Check and diagnose that a graph_op is valid when creating a GraphOperationInst


On the Swift Community Podcast, Jon Shier, Kelvin Ma and Chris Lattner discuss the Result type that is being introduced in Swift 5.

News and community

Xcode 10.2 beta 3 is shipping with a stable ABI. 🎉🎉🎉

Ted Kremenek wrote a blog post laying out the Swift 5.1 release process.

On the Swift blog, Jordan Rose went in-depth on ABI Stability and More. Especially recommend taking a look at the nice summary at the end of the post!

In another post on the Swift blog, Joe Groff wrote about Evolving Swift on Apple Platforms After ABI Stability.

… and in another one (!), Erica Sadun writes about enhancing String literals delimiters. 👏

Chris Eidhof and Florian Kugler have open sourced the Swift Talk backend, which is written in Swift. This adds another great resource to learn about Swift on the Server!

Erica Sadun wrote a blog post on some inconsistencies with access control in combination with extensions.

Commits and pull requests

Christian Schnorr reported a bug with @discardableResult and Suyash Srijan merged a pull request to fix it… on the same day! 🏎

Robert Widmann merged a pull request adding support for default arguments in enum cases. Still remaining: default arguments for subscripts and variadic elements in enum cases. 🎉

Accepted proposals

SE-0241: Deprecate String Index Encoded Offsets was accepted.

Feedback on the initial proposal was mostly positive, but several people expressed some reservations about some of the new API, and the authors agreed to reduce the proposal to a more minimal change. That new version generally met with approval, with a few dissents:

  • Some community members took the opportunity to register their disapproval of the lack of integer indexing into String. While those complaints are noted, this review was not the place to air them.
  • Lily Ballard expressed concern about the lack of structure of these encoded offsets and about their behavior when the offset does not correspond to a scalar boundary. The Core Team generally agrees with the proposal author that the offset not matching a scalar boundary is a programmer error for which trapping is consistent with Swift’s general behavior on similar precondition violations.

Proposals in review

SE-0242: Synthesize default values for the memberwise initializer is under review.

This proposal aims to solve a simple outstanding problem with the way the Swift compiler currently synthesizes the memberwise initializer for structures by synthesizing default values for properties with default initializers.

Swift Forums

Tellow Krinkle pitched a proposal to introduce Generic throws.

Right now, you can make a function foo take a function that optionally throws, and only throw if the given function also throws, like this:

func foo(_ body: () throws -> ()) rethrows {}

However, you can not make a function take an object with a method that optionally throws and only throw if it throws:

// Not currently supported
func foo<T: OptionallyThrowingProtocol>(_ body: T) throws follows T {}

This pitch would allow you to do that.

Kelvin Ma shared a Vector manifesto pitching a possible way of approaching the addition of a Vector type in Swift.

Vectors, understood as 2, 3, or 4-component numerical aggregates, are a fundamental currency type across many domains of programming. This document seeks to lay out a cohesive vision for adding standard vector support to the Swift language, with consideration for relevant long-term goals for the language type system.

Saleem Abdulrasool posted another update regarding Swift on Windows… with UI!

The Windows port has been coming along pretty well. Although it is not yet complete, it is now at the point where you can start doing interesting things with it. As such, I put together a little Hello World^WSwift program for Windows using just Swift! As the saying goes, a picture is worth a thousand words …


Making working with floating points easier? I’m all for it.
And the greatest news of the week is… 😎