Working with Swift: Adopt a Protocol or Pass a Function?

Without fail, any time Rob Napier (@cocoaphony) speaks or writes, I gain insight into new and deeper ways to solve problems with Swift. In January 2016, he gave a talk at dotSwift, and I wanted to record my thoughts on something he said that made a lot of sense when it comes to the topic […]

Swift Functions as Types

For the well-versed functional programmer, the fact that functions in Swift are Types is no surprise. But I’m relatively new to the game on that front, so when I first encountered the idea of thinking of a function as a Type back when Swift was announced in 2014, it was a real eye-opener for me. […]

Clean Coding in Swift – Functions

I’ve been thinking a lot about how the principles of clean coding (Bob Martin’s “Clean Code“) apply in Swift. How do I express clean code in this language? Conversely, how do I avoid writing cryptic code in Swift? What language features help me write clear and self-explanatory code and what language features present the potential for tempting me […]