movq

Wherein I Move A Lot of Words Around

Objective-C

Immutable Mutable

Type 'NSMutableArray' does not conform to protocol 'MutableCollectionType'

I really just have no words for that.

Mixed Objects in Swift Collections

At first the idea that a collection in Swift could only be one kind of object bothered me, but I’m slowly seeing a useful pattern emerging from this — one that Obj-C made tedious due to its grafting of an pass-by-reference-only object pattern on top of another language.

In the specific case that I just solved, for example, I have a table controller with a static list of choices and actions that would be performed when clicked. In Obj-C I’d probably do something like: