Do you want to learn how to do proper error handling in Swift? Start here. By the time you will finish reading these articles, you will have a better understanding of functional programming, you will learn some new design patterns, and you will definitely fall in love with promises.
First, learn how to handle errors in the traditional way...
Errors in swift
- Error Handling in Swift - super article by Andy Bargh
- Asynchronous Error Handling in Swift 2.0
- Error Handling in Swift: Might and Magic
- Using try / catch in Swift with asynchronous closures
- Error Handling in Swift 2.0
- Everything You Should Know About Error Handling in Swift 2.0
- Error-Handling in Swift-Language
Now you know what's a result type. Let's add some extra functionality.
- Asynchronous error handling - this one leads you directly to promises...
- Higher-rank and higher-kinded types
- Functors, Applicatives, and Monads in Plain English
- Functor and Monad in Swift
- Swift Functors, Applicatives, and Monads in Pictures
- Let's talk about Monads
- Swift rocks
Here we are. Promises. The real deal. Go for it.
- Promises In Swift - Khan Lou - check the source too, I made a fork.
- Promises in Swift - Robin Gham
- Back to the Futures
- Making Promises
- We have a problem with promises - node.js based, but you have to read it!
- PromiseKit - ultimate weapon of choice.
yellow mark = recommended (contains everything that you'll need)
Final suggestion: make promises. You won't regret it. ;)