Foundation improvements, no longer a fable
Resilience and ownership, back on the table
   Swift 4 is now live
   Let’s look to Swift 5
The primary goal: get that ABI stable

It was iPhone hardware day this week, but don’t forget about the software side of things — iOS 11, Xcode 9, and Swift 4 GM releases all available on the developer portal.

But you’ve decided to stop refreshing the Apple Store web site and have found your way here…welcome! Let’s get into the Swift news.

Starter tasks

Starter tasks are a great way to get started with contributing to Swift. Ask questions right in the bug reporting system, and get feedback when you submit your pull request.

  • SR-5856: Error claims a protocol is a generic type, but no generics are used
  • SR-5457: Specific error message when user tries to compile Swift executable
  • SR-5337: Improve diagnostic for ‘var’ in parameter position

Submit a task by sending a pull request or a tweet.

Swift Unwrapped

In episode 28 of Swift Unwrapped, JP and Jesse discuss the Clang & Swift refactoring engines and how you shouldn’t be afraid of C++ code.

News and community

Xcode 9 is out, with both Swift 3.2 and Swift 4.0 support! 🎉 Check out the Swift Language section of the Xcode 9 GM release notes while you’re waiting for your download to complete.

The 11th annual US LLVM Developers’ Meeting is coming up on October 18, and the list of accepted talks is available. Something to look forward to if you’re interested in the compiler level or curious about implementing Swift generics?

Brian Gesiak published The Swift Compiler’s Build System, the second post in his ongoing series Getting Started with Swift Compiler Development.

Commits and pull requests

Here’s one from the archives: you may know that an optional is an enum behind the scenes, but did you know optionals used to be arrays that were either empty or holding a single element? Take a trip in the wayback machine: here’s the commit from 2013 and associated Twitter conversation.

Michael Ilseman landed a cherry pick to fix mutating the various String views with popFirst in Swift 3.2. This is a great example of a small targeted fix with unit tests, and as someone who enjoys reading code I think it’s a great example of working on the standard library.

Max Moiseev landed an interesting change to the BinaryInteger protocol to speed up performance of accessing arbitrary words within an integer. It’s great to see the attention to detail the Swift team spends looking at performance. 🙏

Doug Gregor opened a pull request to implement more of SE-0157: Support recursive constraints on associated types. The bug report SR-3453 has all the details and links to the previous pull requests on this feature.

Swift Evolution Proposals

The review period for SE-0184: Unsafe[Mutable][Raw][Buffer]Pointer] is over, and we’re still waiting for the official results.

You can review the status of all proposals on the Swift Evolution status page.

Mailing lists

As part of his research, Brian Gesiak asked about the history of the Swift project’s build system. Check out his original post with timeline and the ensuing thread for all the details.

Alejandro Alonso opened up discussion on unifying the concept of random number generation in Swift. In addition to the original post and thread, there’s a gist with some ideas on what the end API might look like.

Logan Shire posted about some common issues when working with enumerations: needing to iterate through all options, and getting a count of cases. Follow the rest of the thread for some discussion on why you might need these features and how they might be implemented.

Get a real life behind-the-scenes peek at Swift engineers discussing coroutines, ABI stability, and stack vs heap over two hours.

Finally

Q: What color would Chris Lattner paint the bikeshed? 🎨

A: Resilience.