Gone is the dynamic nature of ObjC; it has instead been replaced by a rigid, generic based type system. I know the world of C++, Java, and C# programmers have rejoiced. Myself, having worked in Visual Studio building tools for .NET and Windows developers for many years and leaving that for the world of Cocoa and ObjC, I am greatly saddened by this turn of events.
I do not think we got “ObjC without the C”, rather, we got something much more like C# that compiles on clang and bridges into Cocoa a bit haphazardly.
Yes, generics can be useful in particular cases. However, they are not helpful, ironically, in the generic use case. I would argue that simply sticking with a stronger-type base instead of fully type-safe and generic based language would have been a more pragmatic route to take.
I have to wonder, what is the pragmatic goal of Swift? From where I sit, it gets all of the defaults wrong because the defaults should have been about the interaction with the Cocoa API. Until there are native Swift versions of those, all of code looks and feels much messier and far less elegant than what we have today.
I realize that it's a vain hope that this bug report will be anything than summarily dismissed, but I feel I have to make the attempt nonetheless.
My conclusion is that dynamic dispatch must be a first class citizen in order to make Swift suitable for UI programming. Also, the generics must be much simplified and permissive in order to not obstruct and complicate the day-to-day programming work.
Update (2014-06-22): David Owens II has a further update on the JSON example.
Stay up-to-date by subscribing to the Comments RSS Feed for this post.