3 ms·
The next generation of Cocoa APIs will be developed with Swift in mind. Every Cocoa API today is developed for the features and limitations of Obj-C. And yes, f
by eridius 12y ago
The next generation of Cocoa APIs will be developed with Swift in mind. Every Cocoa API today is developed for the features and limitations of Obj-C. And yes, for a number of years to come, APIs will still retain Obj-C compatibility. But we'll also start seeing Swift-only APIs (even if these are functionally equivalent to other Obj-C APIs), using design patterns that are appropriate for Swift instead of Obj-C.
So yes, you do need to know the Cocoa APIs. That's extremely important for developing applications today. But the applications of tomorrow will be developed using APIs we don't have now, APIs that are based around idioms and design patterns that will be developed over the next year (or few years) as people explore Swift and figure out what they can do with it that's different from Obj-C.
Apple will undoubtedly define many of the idioms and design patterns themselves. But there will be many that emerge from the community, from experiments that people do and open-source libraries they write.
- interpol_p 12y agoI agree that Swift will influence the development of future APIs, however I think my point that it will not reset careers still stands. I don't believe that languages influence API design very much — unless they are of a fundamentally different paradigm, which Swift is not. Most of the iOS concepts I see new developers struggle with are related to architectural decisions not informed by language design. For example, the biggest thing I see new iOS devs struggle with is reusable table/collection view cells: the concept of cells moving into a pool once scrolled off-screen and re-used was made for performance reasons, new developers often attach model state to their cells and end up with all sorts of bugs. This is not a language issue. APIs are where the majority of the learning is. For example, if you try Reactive Cocoa (or Swift RX), you are going to be thinking about your app design in a completely different way. Same thing applies to auto-layout, device trait collections, layer-backed view hierarchies, and so on. These concepts are not likely to be influenced by Swift, and these are the things that really matter. That said, I do see Swift eventually dropping message-passing-heavy APIs (NSNotificationCenter, target:selector patterns) in favour of more strongly typed APIs. But most developers should not find the transition jarring.