My initial opinion was swift does a lot of things much better, (no header files, new operators, etc.) but learning a new language takes a long time + it appears a majority of code is still in objC
My initial opinion was swift does a lot of things much better, (no header files, new operators, etc.) but learning a new language takes a long time + it appears a majority of code is still in objC
It's not clear from your post if you're trying to make money as an iOS dev but failing, or if you're making money writing for a different platform, but happen to know Obj-C. If the former, you should learn Swift - but you don't need to "drop everything" to do so, it's just a language. If the latter, whatever, doesn't matter either way.
[1] Unlike in Obj-C where they were relegated mostly to delegates/data sources and a few obscure framework classes (remember IKImageBrowserView?), in Swift they're practically the base of the language - almost every type you write should probably be based on a protocol.
I can see you wrote that post in an auto-completing IDE.
ymmv, of course. i'm new to iOS land and i write objective-c exclusively during my day job. that being said, the difficulty in iOS development (in my experience) is not in the language, but the APIs, abstractions, and patterns - and they are the same regardless of whether you're using swift or objective-c
“Objective-C is not going away. We still love Objective-C as a language; we still very much depend on Objective-C and do a tremendous amount of work in Objective-C here internally at Apple,” Federighi told Ars. “We’ll be supporting Objective-C and continuing to evolve it as necessary to fit into this evolving world. We do think that Swift is the language that we recommend for new developers to our platform who are investing for the future and building new apps. We think Swift is absolutely the right place to start. But we’ll continue to maintain, advance, and support Objective-C for as far as we can see.”
From http://arstechnica.com/apple/2015/12/craig-federighi-talks-o...
extension MyViewController {
func fooAction(sender:AnyObject) {
}
}You need a bridging header to call back to ObjC
Very few people are blogging or writing books with ObjC. It's mostly Swift, and has been since June 2014:
At WWDC 2015, the only talks that used Objective-C were related to the new language features. I don't remember any other still using the language.
So you can already see in which direction Apple bis steering the boat.