Ok, so not to brag or anything, but I got to meet Chris Lattner at the Swift Language User Group (SLUG) Meetup last week! The meetup presentation about Enums, Pattern Matching, and Generics was incredible - see my live tweets of Austin Zheng's elegant Swift code. The video should be posted soon - I'll make sure to send it out in a future newsletter!
It's incredible to witness first-hand how much Chris Lattner personally cares about the success of Swift. Not only did he attend the meetup, he stayed afterwards answering our Swift questions and hearing our feedback. It just makes me so much more excited about the Swift revolution!
One useful tip from Chris was to make sure you upgrade your code one XCode 6 beta at a time - each beta is set up to fix the changes from the previous beta, so if you skip an XCode beta, it'll be much harder to figure out what the issue is. Of course I experienced this first hand this week, when I tried to open up code that I haven't touched since XCode 6 Beta 3 in Beta 6 to fix some issues. It took me a while to figure out what was missing!
The big Apple Announcement is officially set for September 9th! I can't wait. So excited! Given that Apple is clearly hustling for the quickly approaching deadline, I'm not sure whether we can expect a new XCode 6 beta next week - especially considering that Monday is a holiday.
There are, however, two great blog post on the Swift Blog to add to your Labor Day reading :)
Swift Around the Web
"WKWebView is the centerpiece of the modern WebKit API introduced in iOS 8 & Mac OS X Yosemite. It replaces UIWebView in UIKit and WebView in AppKit, offering a consistent API across the two platforms." Mattt Thompson provides a great deep dive into the new WKWebView framework, showing off it's incredible power compared to the now outdated UIWebView.
Swift: Calling Swift functions from Objective-C
Erica Sadun shows off how easy it is to work with Objective-C in Swift. I can confirm that this is the case! I also want to recommend reading all of Erica's other Swift blog posts - wish I could include them all in this newsletter!
Expanded Thoughts on Swift’s Type Inference
Andrew Bancroft writes about the readability of code when the type is inferred automatically. It is definitely something I keep thinking about in my own code. His advice: "Don’t go implying that you’re returning one thing when you’re returning another. If you must, then yes, explicit types are your punishment."
Cocoa Design Patterns in Swift
Love the slides from Michelle Titolo's 360iDev talk, especially the walk-through of design patterns in the end. Can't wait to see the video of the presentation!
Swift generics: It's all in the protocols (Part I)
This blog post is a demonstration of what Austin Zheng said in his SLUG talk about Swift generics- "the more you constrain them, the more you can do with them".
This weeks libraries are focused on showing off the power of Swift. Enjoy!
- Surge - Surge aims to bring Accelerate to the mainstream, making it as easy (and nearly as fast, in most cases) to perform computation over a set of numbers as for a single member.
- Moya - Network abstraction layer written in Swift
- CryptoSwift - Crypto related functions and helpers for Swift implemented in Swift programming language
- Literally - Swift Literal Convertibles for Foundation
- ENSwiftSideMenu - A simple side menu for iOS 8 written in Swift language. Using UIDynamics, UIGestures and UIBlurEffect.
- Design Patterns Playground - Swift way to explore design patterns
In Case You Missed It
In case you missed the new stuff on my blog, this is your chance to make your long weekend extra enjoyable :)
- Swift: Unit Testing Tips and Tricks - note that I'll be updating this blog posts tomorrow. Meanwhile, you can read (or join) the discussion about setting up variables in unit tests on Twitter here.
- Swift: Manipulating Constant Objects
I'll also be speaking at a few great events coming up in September and October. I'd love to meet you if you're there!
- SLUG: Building TableViews with Swift and iOS8 - San Francisco, Sept 10th
- Swift Hack Day - San Francisco, Sep 27th
- Wearables & Things - Washington, D.C., Oct 20-21