Objective-C or Swift?

September 13th, 2014 · · ios, development, swift

I've been planning to get on the iOS8 boat for a while now (well, since they announced it, actually). But as one with a full life, I haven't gotten around to actually do much. I played around with some Swift, watched some WWDC14 sessions but that's about it.

Until tonight: I want to start over again on Drash. There's a half baked iteration made for iOS7 (the current app runs still on iOS6 but feels right into place on iOS7 thanks to its minimal interface). But iOS8 changes so much again that I feel that it's best to start over again.

But then this begs the question: Objective-C or Swift?

There's some pro and cons to both, I think.

Swift is clearly the future, but while it's gone 1.0 I feel that it's not nearly done enough to be productive in it. First of all, it's so new that it's hard to find a "best practices" baseline. Even when not bothering what everybody else thinks, I think this is hard enough to do yourself. Also, on my forages into Swift this summer I learned that using a new language to create a new app is not the smartest thing to do. You get sidetracked into "how do I do this best in Swift", and that means not getting any of your real work actually done (or much slower). And, my usual set of tools/libraries are not available as native Swift, so I lose time rewriting those too. On the other hand: postponing that job is not really a good solution because I need to do it sometime anyway, so why not now.

Objective-C on the other hand is well known (to me). I know its ins and outs (or at least the most important ones of them). It's obvious how it works. On the other hand: with the new kid on the block how long is it going to stay around? Probably long enough for it not to be a problem when starting a new app now, but I guess we can expect that Apple converts more of its codebase to Swift over time (or at least their public APIs). So the sooner I'm on the Swift boat, the better. Also, I have a set of libraries and tools I can use with Objective-C code, making me much more productive.

Soooo?

Given that I want to be productive and have this new app out pretty soon, I'm going for Objective-C. I feel that Swift is going to pose too much of a distraction from actually developing the app. There's also the new stuff in iOS8 (I'm planning to add an extension too, so there's much to learn), going with Swift means 2 new things in one new app, and that might prove too much of slowdown. And I want to finish this, and not get beached along the way in the little language details.

The next project? Swift. I promise.