It’s iPhone X week! Tomorrow, the first customers will receive their new devices. In other news… the team working on Swift at Apple is reading our blogs, so definitely keep up the blogging (or start doing so?!)

Apple also released Xcode 9.1, which includes fixes for various Swift crashers.

有兴趣赞助 Swift Weekly Brief?点击这里

Starter tasks

Submit a task by sending a pull request or opening an issue.

Swift Unwrapped

In Episode 35 Jesse and JP talk about performance profiling in Linux - without Instruments.

News and community

The video of Doug, Slava and John’s talk on “Implementing Swift Generics” is now available.

Apple’s Joe Groff and Xi Ge gave talks at Swift Summit this week, where Joe talked about “Swift’s Reflective Underpinnings” and Xi talked about “Creating Refactoring Transformations for Swift”. At the same conference, there were also “Open Sourcing Swift” and “Refactoring Transformations” labs run by Apple. So awesome to see Apple engineers attending and speaking at conferences, sharing their knowledge! 🤓

Video’s of JP’s and my talk from FrenchKit are available. JP talked about Profiling Swift Performance on Linux, I gave a talk about What’s up with Swift 5.

Slava shared a gentle reminder of the awesome swift-source-compat-suite, where you can add your open source project to make sure new additions to Swift do not break source compatability.

The first swift evolution proposals (SE-0075 and SE-0186) have been implemented in Swift 4.1, so this Swift version has been added to the status page now, too.

In Signapore, the government is teaching seniors to write Swift for the Hour of Code.

Slava’s fingers are itching to implement an Either type. Soon™?

Chris Bailey announced Kitura 2.0, IBM’s web framework for building Swift applications.

Paul Hudson introduced the Swift Community Awards a few weeks ago, and the shortlist is available. It includes this very newsletter as well as its podcast, Swift Unwrapped. That’s quite the honor! Thanks for all of you who mentioned us, and feel free to vote and make it even more awesome! 😎

Commits and pull requests

Mark Lacey opened a pull request that abolishes ImplicitlyUnwrappedOptional (IUOs) completely - in Swift 5. You can test this (and more) in the development toolchain snapshots that Apple is sharing on Swift.org. Go test and explore what’s coming in future versions of Swift! It was first (partly) implemented in Swift 3 as part of SE-0054.

Slava Pestov pitched a proposal on cross-module inlining and specialization by opening a pull request on swift-evolution, which would be another step towards Swift 5’s goal of reaching ABI stability.

Mailing lists

Chris Lattner shared some thoughts on Python interop in Swift.

In short, I think we should build a simple Swift/Python interop story. This sort of thing has be built numerous times for many languages (owing to Python’s great support for embed-ability), including things like PyObjC, boost.python, and many others.

If we do this, the vast majority of the Python ecosystem should be directly usable from within Swift code, and there are only a few major syntactic differences (e.g. ranges work differently). We would add failable inits to the primitive datatypes like Int/String/etc to convert Python.Object values into them, and add the corresponding non-failable conversions from Python.Object to those primitives.

Overall, I think it will provide a really nice experience, and allow us to leverage the vast majority of the Python ecosystem directly in Swift code. This project would also have much more narrow impact on the Swift compiler than the ObjC importer (since it works completely differently). For a first cut, I don’t think we would have to worry about Swift classes subclassing Python classes, for example.

Finally

Joe Groff’s human was very, very prepared for his talk at Swift Summit.