Issue #93 02 Nov 2017
Written by: Bas Broek
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.
Interested in sponsoring Swift Weekly Brief? Learn more here.
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! 🤓
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.
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.
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
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
String/etc to convert
Python.Objectvalues into them, and add the corresponding non-failable conversions from
Python.Objectto 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.
Joe Groff’s human was very, very prepared for his talk at Swift Summit.