2020
April
-
Protocol-Oriented Programming
Protocol-oriented programming enables writing code that is more modular, decoupled, and flexible, compared to traditional object-oriented programming. Not surprisingly, protocols are at the heart of protocol-oriented programming. In this article, I'll explain what protocol-oriented programming is and how to adopt this paradigm using protocols to define requirements and provide default implementations, while also ensuring optimum performance.
-
Capture Lists
Capture lists have been available in Swift since its debut at WWDC 2014. They play a crucial role in ensuring your asynchronous code does not leak memory or cause exceptions at runtime. In order to use capture lists correctly, you'll need a good grasp of related topics including value vs. reference types, strong reference cycles, and escaping vs. nonescaping closures. In this article, I'll cover these supporting topics first, and then explain why, when, and how to use capture lists effectively.
2019
October
August
-
Using Record in Combine
-
Debounce vs. Throttle in Combine
-
Pause and Resume a Subscription in Combine
-
Combine 101
In this article I'll provide a gentle but thorough introduction to Combine.
Check out my latest book: Combine: Asynchronous Programming with Swift
It’s packed with coverage of Combine concepts, hands-on exercises in playgrounds, and complete iOS app projects. Everything you need to transform yourself from novice to expert with Combine — and have fun while doing it!
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
© 2020 Scott Gardner