Monday, June 23, 2014

Immutable Swift

Alexandros Salazar:

I am fascinated by the possibilities Swift opens up: we are now able to try, in an idiomatic way, constructs that would have been strange and out-of-place in Objective-C. I think they’re exciting, and definitely worth exploring.

[…]

So there we have it. A very simple Cocoa app, but put together very differently from a normal Objective-C app. Even if you’ve used Model-View-ViewModel before in Cocoa, odds are you’ve never tried to use completely immutable data structures quite like this. I know I gave up very quickly the few times I considered it, because ensuring immutability actually increased the mental overhead of writing the Objective-C code.

Comments RSS · Twitter

Leave a Comment