Writing Cleaner Asynchronous Code in Swift Using Promise Pattern
What is the current state of writing asynchronous code in Swift 4?. The current mostly used pattern is to provide a callback closure that will be invoked when the task complete passing the result or an error. While this pattern works, it can be very hard to maintain and understand when we need to write multiple asynchronous tasks that also depends on the result of previous task.