Chris Dzombak

sharing preview • dzombak.com

Benefits of Cocoa: Still here in Swift

Benefits of Cocoa: Still here in Swift

Sigh.

Okay, let’s take this one item at a time:

C compatibility

Still there.

Nil safety

Was never there in Objective-C, and Swift improves on it.

Duck typing

Having a more capable type system means we can lean on it instead of duck typing. For whatever it’s worth, I rarely used duck typing in Objective-C as it is; typically I either lean more heavily on the class hierarchy or introduce a protocol instead. (I may go into this in more detail in a later blog post.)

Dynamic dispatch

Will be missed, but it does appear Swift will somewhat handle this as well, and I would expect more developments in new language versions.