Swift Summit SF 2015 Highlights
Check out the highlights of Swift Summit, a Swift-focused conference held in San Francisco! By Greg Heo.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
Swift Summit SF 2015 Highlights
15 mins
- Everything Has Changed
- Andy Matuschak – Feet in Both Worlds: from Objective-C to Swift
- Keith Smiley – Tales of a Rewrite
- Wildest (Coding) Dreams
- Sam Soffes – Simpler Tables with Values, Enums, & Protocols
- Thomas Visser – Beyond the Block-based API: Building a Simple Future
- JP Simard – Working with Binary Data in Swift
- Chris Eidhof – Swift Interop
- Eyes Open (to Swift)
- Natasha Murashev – Protocol-Oriented MVVM
- Gwendolyn Weston – Why Swift is swift
- Greg Heo – What I Learned From 55 Swift Standard Library Protocols
- Two (or more) Is Better Than One
- Where To Go From Here?
Update December 2015: The conference videos are being released! Where available, the session titles now link to the video posts.
Now that we’re over a year past Swift’s public announcement, you can find more and more Swift content in the usual iOS/Mac conferences.
But for the truly Swift-obsessed, there’s Swift Summit! Their first event in London earlier in 2015 was filled with great content and a killer speaker lineup, which means I had high expectations for the San Francisco edition.
In this article, I’ll share my thoughts on the conference and highlight a few talks that I especially enjoyed. If you have any Objective-C Bad Blood left, Shake it Off and prepare some Blank Space in your mind for this Swift Summit recap!
Everything Has Changed
The conference was packed with content over the two days: a single-track mix of 10-minute lightning talks, 18-minute and 25-minute talks, and two panels.
Among my favorite talks were those I categorized as the “big ideas” ones, where the speakers talked about some of the larger issues around Swift and Swift adoption.
Since we’re still in the early days of the language and many companies out there are being cautious about moving to Swift, these talks were great for getting a sense of what it’s like using Swift on a day-to-day production basis.
Andy Matuschak – Feet in Both Worlds: from Objective-C to Swift
Andy kicked off the conference with his talk on moving from Objective-C to Swift. He started with the question: what would Swift be like without Objective-C? And once Objective-C goes away, what’s the shape of the hole it leaves?
To please the language nerds in the audience, Andy continued with a series of hacks he’s had to use when writing Swift that still supports bridging over to Objective-C. I thought this was a great illustration of the state of the language: still in that liminal space with “feet in both worlds,” as the talk title states.
This was a thought-provoking talk because so many of the language decisions made in Swift come directly from its need to interoperate with Objective-C. There’s a certain opportunity cost paid here that we wouldn’t have if Swift were a complete clean-sheet design, and it’s fascinating to think about where the Swift language could go in the future.
Keith Smiley – Tales of a Rewrite
Keith told the story of how the team at Lyft slowly rewrote their entire app in Swift.
The Lyft app is probably one of the larger and widely-used 100% Swift apps, which means this talk had a wealth of information about making the transition and how Swift performs in production.
From starting small with a single person working on the Swift app, to dealing with issues around long compile times and continuous integration support, the talk covered the trials and tribulations of performing such a substantial re-write.
iOS team member Vincent Ngo really liked hearing about how the Swift app started as a small prototype and grew from there:
Although an Objective-C rewrite would have been an improvement over the aging codebase too, the added benefit of Swift’s safety features and concise syntax was a nice bonus. I’m sure maintaining 25000 lines of code, down from 75000, makes the Lyft team a little happier at work!
Wildest (Coding) Dreams
Next up are the talks that had code, code and more code!
As a technical conference, there were plenty of talks showing off the latest coding techniques and open-source libraries. I don’t always make time to dive into open-source code, and these kinds of talks scratch that itch for me and leave me with a pile of repositories to star and come back to later.
Sam Soffes – Simpler Tables with Values, Enums, & Protocols
Sam showed off Static, an open-source project for dealing with static table views. This was a great demonstration of coding in a modern Swift way: lots of value types, structs and view models.
If you’ve dealt with tables in watchOS, you know how easy it can be to set up a table without a delegate or data source: just specify the number of rows, and then configure each cell. Sam showed how you can have a similar level of elegance, thanks to the code that wraps the Cocoa complexity with Swift simplicity.
Thomas Visser – Beyond the Block-based API: Building a Simple Future
Thomas pulled off the challenge of live coding to refactor some asynchronous code that fetched data from the network to use futures.
From a starting point of callbacks and completion handlers and a “pyramid of doom” with lots of indentation and/or private helper methods, Thomas was able to refactor the code to use futures, complete with type safety and error handling.
Swift team member Eric Cerney dislikes messy syntax enough to be convinced:
You can check out Thomas’s open-source futures library, BrightFutures, on GitHub.
JP Simard – Working with Binary Data in Swift
JP talked about binary data in Swift, and how he dove into the bowels of everyone’s favorite framework—SourceKit—to work on jazzy, a documentation generator.
He also included a binary hex dump, which is always a good sign in any talk:
In contrast to the usual musings about higher-level structs and protocols in Swift, JP’s talk was a nice change in getting down to the byte level.
Chris Eidhof – Swift Interop
Chris opened up day 2 of the conference with a live coding demo on value vs reference types, a topic that still generates a lot of discussion and questions.
By wrapping an NSData
instance in a struct, many issues came up that Chris had to resolve:
- How do you handle mutation of a value type?
- How do you mix value types and reference types?
- How do you handle sharing and copy-on-write?
I liked the problem-solving approach here, where Chris would write some code, demonstrate a problem in the implementation, and then fix it.
With much of the Cocoa APIs being class-based, this talk was a great demonstration of how to make the transition to value types and structs to keep thing Swifty.