Apr 25, 2016
Recently I updated an Objective-C library for improved Swift interoperability. The Objective-C library hadn’t been touched for a while to the extent that it still used manually memory management rather than ARC. Converting a pre-ARC library added additional challenges.More »
Apr 20, 2016
In my previous post: “Unexpected behaviour with Swift’s [Any]”, I declared a nested array of integers as:
let a : [Any] = [1,2,,[4,[5,6]],[], 8]
Any feels like a code smell; by using
Any I’m effectively saying, “ignore all the type-checking the compiler performs, instead I’ll rely on my own knowledge of the types”. Experience shows I am not as knowledgable as the compiler, especially after some time has elapsed and I’m trying to add a new feature…
Apr 19, 2016
Any idea why the following code is generating a runtime exception?:
Adding an explicit type declaration solves the problem:
But why?More »
Mar 7, 2016
AnyError in the above code?
AnyError provides a unified concrete error type for a
Future . A unified error type is necessary when composing futures with
flatMap so, if one of the futures fails, the error can be propagated through the compositional chain.
Mar 7, 2016
I’ve released a Cocoapod that encapsulates UIKit document picker UI; allowing the user to select iCloud documents (and Google Drive, One Drive, etc), with a simple
Future based API.