Hacking with Swift -> Lazy Initialization

All hail Lazy Initialization     Lazy initialization, also known as lazy loading, is one of those tools every developer should know. When lazy loading, we don’t need to instantiate the property on class initialization time. This is great if you have a bunch of expensive objects you need to create in your view controller, but not …

Swift in-out variables – passing by reference

Passing by reference is sometimes convenient depending on your needs. Luckily, if you’re using Swift, it’s pretty simple. In Swift, you can add the inout keyword in place of var. Here’s an example:


What the heck is a Monad?

  Credit: xkcd Lately, I’ve been attempting to transition more of my code from Objective-C to Swift. Consequently, I’ve also been trying to wrap my head around some of Swifts functional aspects like Functors and Monads. Knowing that functional programming can sometimes seem overtly academic and less practical, I was somewhat reluctant to begin my studies. …read in detail