It's December! Happy 1 year anniversary to Swift Open Source! The Swift team and community have done an amazing job this year building and evolving, going way above and beyond to make Swift amazing for all of us. Thank you 💛
Swift Around the Web
Method Dispatch in Swift
"Method Dispatch is how a program selects which instructions to execute when invoking a method. It’s something that happens every time a method is called, and not something that you tend to think a lot about. Knowing how method dispatch works is vital when writing performant code, and can illuminate some of the confusing behavior found in Swift."
Optionals and String Interpolation
"Your name is Optional(NatashaTheRobot)"
That's definitely not something you want to display to the user... and luckily this will be an actual warning in Swift 3.1. Still, dealing with the optional string interpolation issue is tricky and subtle, so @olebegemann comes up with a simpler solution. ??? anyone?
try! Swift Tokyo: Lightning Talk CfP Open for Attendees
Only one more week left to get your discounted Swift Bird tickets to try! Swift Tokyo. Attendees have the option to submit a ⚡️ lightning talk ⚡️ on any topic (seriously, anything!). I can't wait to hear these!
Bitbucket: Coders Gonna Code
Start a free trial of Bitbucket Server and get this shirt :)
Swift 3.1 Release Process
"Swift 3.1 is intended to be source compatible with Swift 3.0" 🙌
It'll be released in Spring 2017, but all the changes should be completed by January 16th.
Proposal: Universal dynamic dispatch for method calls
Great read from Chris Lattner on Swift and the old static vs dynamic paradigm thinking:
"The upshot of this is that Swift isn’t squarely in either of the static or dynamic camps: it aims to provide a very predictable performance model (someone writing a bootloader or firmware can stick to using Swift structs and have a simple guarantee of no dynamic overhead or runtime dependence) while also providing an expressive and clean high level programming model - simplifying learning and the common case where programmers don’t care to count cycles. If anything, I’d say that Swift is an “opportunistic” language, in that it provides a very dynamic “default" programming model, where you don’t have to think about the fact that a static compiler is able to transparently provide great performance - without needing the overhead of a JIT."
Swift Package Manager
Try out new SwiftPM features!
I'm excited about Version Pinning!
Guarding Against Long Compiles
Great tip to make sure you get warnings whenever you write Swift functions that takes too long to compile 😬
Caching anything in iOS
Elegant solution to caching in iOS using the power of Swift 💪
"That is it! With
Cachable.swiftnow anything in the app can be stored in the filesystem and retrieved later, without actually hard coding it for file uploads like the initial requirement."
- Insanity - A tool that brings meta-programming to Swift, allowing you to code generate Swift code. Blog post here.
- nsregularexpression.com - Swift-based regular expression editor
- SwifterSwift - A handy collection of more than 365 native Swift 3 extensions to boost your productivity.
- Interpolate - Swift interpolation for gesture-driven animations
- PlayAlways - Create Xcode playgrounds from your menu bar
- TinyConsole - ℹ️📱 A tiny log console to display information while using your iOS app.
Watch Apps: How Do We Test Them?
No test targets in Watch Apps 😢 The solution is to just not write any bugs of course... or to move the logic code (including nice testable ViewModels) into frameworks, which can be tested.
Exploring Swift Memory Layout
@mikeash explores how Swift lays out data in memory, including both your own variables and Swift’s internal data structures. He then builds a program to recursively scan memory at run-time to dump out everything we want to know, then walk through the results and what they mean, comparing and contrasting with how C and C++ store their data.
The State of UX in 2017
The big take-away here is that we've reached a point in design where the basics have been normalized and can be automated. Seriously, just don't create a new and "innovative" navigation system. Instead, designers get to focus on the little details and the future, such as designing chat interfaces, making it smooth to transition between the increasingly fragmented interfaces, VR, accessibility, and more 🚀
💻 Swift Full Time
- Senior iOS Mobile Developer at HelloFresh - Berlin, Germany
- Lead Mobile Engineer at Prolific Interactive - San Francisco, CA
- iOS Entwickler at sipgate GmbH - Düsseldorf, Germany
Random Cool Stuff
So I'm going to be all new-agey today since the New Year is coming up and I think we all need some positivity. Anyway, I know this might be a bit controversial, but I personally love The Secret book and film. I'm excited to make my ambitious vision board for 2017, focusing my energy into things I can change and achieve vs world events I have no control over.
If you'd like something with a similar message, but less Hollywood maybe, I also love Be Here Now by Ram Daas. (affiliate links)