Monday, June 2, 2014

Swift doesn't have much Objective-C ancestry

I have been reading The Swift Programming Language with interest today. While it is possible that the ebook is a living document, my current opinion is that Swift inherits much from C++ but at the expense of the runtime flexibility of Objective C. I feel it is a mistake to consider Objective-C as an ancestor to Swift in its currently documented form. The most glaring disappointment is the lack of runtime introspection. Introspection capabilities seem to be limited to the is and as operators; there isn't mention of an equivalent for Objective-C selector types, and no mention of any introspection for class structure. While there are obvious influences from Ruby in Swift, again any introspection capabilities of Ruby do not appear, at least in the current documentation.

No comments: