DH
DH

A Single Writer Pattern in Swift

A Fun Experiment With Shared Mutable State and Lock-Free "Locking"

December 08, 2016

I was talking to a co-worker today about different ways to minimize the risks around having a single shared instance in any app that holds global values which can be read and written to from anywhere in the code.

The potential risks around global mutable state are discussed in lots of places, but some of the key problems are:

  • Race . . .

Read More

Swift's "Final" Countdown

And the inevitable deprecation of inheritance-based polymorphism

December 22, 2015

There’s an interesting discussion happening currently regarding a proposal on the swift-evolution mailing list to make Class types final by default in Swift. The initial proposal references the occasional need for a reference type that is not intended to be subclassed as the primary motivation.

There are some developers who are clearly not in . . .

Read More

The Problems with MVVM on iOS

And some ideas for making it better

July 15, 2015

I love all the discussions I’ve been hearing about MVVM on iOS lately (that’s the “Model, View, View Model” design pattern for those who are unfamiliar). And I’ve now seen four different implementations of the pattern in working apps, one of which I have been involved with myself. But, despite the positive direction MVVM encourages, I’ve . . .

Read More

Archive
  Subscribe by Email and Never Miss a Post