Hacker News new | ask | show | jobs
by no_future 4295 days ago
Can anyone tell me about the interop situation? I'm working on my first iOS app and doing it all the old way with Obj-C, and some things have been a little difficult to grok even though they've been around a while(AVFoundation). I'm very interested in the new Metal graphics API that Apple showed at their presentation. Not sure if I should just switch to Swift for everything now or continue learning/working in Obj-C and slowly transition.
1 comments

I wouldn't recommend Swift to anyone that's new to the iOS SDK. I answered this question recently on stack overflow (http://stackoverflow.com/a/25751738/77567). Here's what I said:

- Objective-C will be around and supported for a long time. (Apple has a massive amount of Objective-C source code that it's not going to port to Swift any time soon.)

- Almost all iOS tutorials, examples, and books use Objective-C.

- Almost all iOS-specific third-party source code you might want to use is implemented in Objective-C.

- It's easier to use C and C++ libraries from Objective-C than from Swift.

- There are many Objective-C experts you can get help from. There are very few Swift experts.

- The Swift language and its standard library are currently not very well documented.

Stick with Objective-C for now. When you're comfortable with the iOS SDK and Swift is better documented, you can consider learning Swift.

Apple could dramatically accelerate this process by switching their own new development from ObjC to Swift. The huge amount of legacy code means this couldn't happen overnight, but if Apple is obviously making the switch for their own new development, Swift will have a huge credibility boost. Apple wouldn't be able to abandon it (or let development stall) without hurting themselves. Until Apple puts themselves at a similar degree of risk as other Swift adopters, developers are going to wonder about the wisdom of committing to an Apple-only platform that Apple hasn't committed to.