4 ms·
I am a big fan of Protocol-oriented development. It allows you to do component-style programming, where it's very simple (swifty) to extend functionality onto
by nivenhuh 8y ago
I am a big fan of Protocol-oriented development. It allows you to do component-style programming, where it's very simple (swifty) to extend functionality onto struct/classes in a easy to understand, reusable way.
Additionally, language features like guard/optionals/etc... allow you to deal with error states & control flow easily.
Two good videos I'd recommend on protocol-oriented development:
Protocol-oriented programming in swift (part 1): https://developer.apple.com/videos/play/wwdc2015/408/ https://developer.apple.com/videos/play/wwdc2015/408/
Protocol and value-oriented programming in UIKit apps (part 2):
https://developer.apple.com/videos/play/wwdc2016/419 https://developer.apple.com/videos/play/wwdc2016/419