S Link
Migrating to Swift for iOS Developers
5-day class for iOS developers: Migrate your own Obj-C app to Swift, and explore new iOS 8 features. First class led by Homebrew pro developer Max Howell.
Swift Around the Web
Human Friendly
As I continue working with Optionals in Swift, there are always several cases in my code where I know an optional can never be nil, but I don't want to use the "crash operator" aka ! to force-unwrap the optional. So instead, I use the NilCoalescing Operator (??) to return an empty version of my object "just in case". @jl_hfl offers one solution to this problem, but not everyone agrees. But this at least gets the conversation going around how to best deal with this inevitable situation in Swift. If you have a strong opinion on the subject, join the conversation on Twitter.
Why we're rewriting our robotics software in Swift
There has definitely been some negativity towards Swift since it came out, especially with it's initial instability, lack of advanced features, and XCode crashes. But this is a great post reminding us of why we need Swift (and especially optionals!).
In an audit of the last 3 years of shipped bugs... ~40% would have been caught immediately by using Swift.
Other Cool Stuff
In Case You Missed It
The Functional Way
These are slides from my talk at the Functional Swift Conference. A video will be posted as well at some point!
Swift: Using String Ranges The Functional Way
As I learn more and more functional programming, Swift is starting to make sense to me in a different and more powerful way. This is just one example...
Tutorials
Touch ID Tutorial in iOS8 with Swift
Simple tutorial for adding Touch ID authentication and displaying an Alert View to the user if the authentication does/doesn’t succeed.
Videos
An Introduction to Haskell
This is an incredibly well-done Introduction to Haskell talk from the Swift London meetup a few months ago. Hopefully it'll help you get started thinking the functional way in Swift!
Functional Voodoo
Fox
As soon as @modocache announced Fox at the Functional Swift Conference, I couldn't wait to run home and implement it as part of my testing suite. Fox is a property-based testing library modeled after QuickCheck in Haskell. Instead of you coming up with test examples, Fox will run through a ton of possibilities to find all the edge cases in your code. Check out the wow-factor examples in @modocache's slides here.
7 Habits For a More Functional Swift
As I was doing research for my talk at the Functional Swift Conference, I ran across these slides, and have to share them! Great overview and tips for implementing functional concepts in your Swift code, and great resources at the end.
Getting into functional programming with Swift
@bach4life implements a logic puzzle first in the imperative programming style we're used to, and then compares it to the functional implementation. This is a great taste of what thinking the functional way is like!
WATCH
Visualizing Watch Apps
@_DavidSmith comes up with a clever way of visualizing the tiny WATCH screen as he works on making WatchKit apps. Great idea while we wait for the actual hardware.
Podcasts
Andy Matuschak: Math Education and Value Semantics in Swift
One of the difficult parts of working with Swift for those coming from Objective-C is knowing when to use Reference (classes) vs Value (enums and structs) Types. Andy Matuschak explains his approach.
Swift Code
Ramotion/paper-switch
RAMPaperSwitch is a Swift module which paints over the parent view when the switch is turned on.
ndmeiri/Panorific
An immersive, intuitive, motion-based way to explore high quality panoramas and photos on an iOS device. Panorific is implemented in Swift.
Swift Thoughts
Learning functional programming can be very intimidating. Just the other day, someone on Twitter recommended I read this ebook. Ok, maybe the book is ok, but the landing page sure is intimidating!
However, as I've been learning more and more functional programming, I found myself really liking the higher-level concepts (which make a lot of sense, and don't even mention things like monads or functors). And as I'm starting to understand the lower-level functional implementation, I find myself understanding Swift and better programming patterns a lot more.
This weekend, I attended the Functional Swift Conference, and one thing that stood out was how interested iOS developers are in learning about functional programming and how excited functional programmers (experts in Haskell, etc.) are to bring a bit of functional programming to iOS with Swift. In fact, @andy_matuschak gave a whole talk about how to encourage team members to write code in a more functional way without isolating them.
Since Swift is so new and there aren't best practices / patterns just yet, I highly recommend learning functional programming to have a better understanding of what decisions to make and when to make them. You'll be seeing a lot more from me on the topic!