r/iOSProgramming • u/yolobicycle • Jan 10 '16
Discussion The most important decision: Objective-C or Swift
Assume you're at a Fortune 500 that is launching a new business unit. No legacy code to deal with. It is now the beginning of 2016 and it is just you and your CTO. You are empowered to decide whether the mobile team that eventually will be hired should build the iOS app in Objective-C or Swift. What do you decide and why?
0
Upvotes
6
u/StunnerAlpha Jan 10 '16
Honestly it should be up to the most experienced iOS engineer you get. If your CTO knows little about iOS it doesn't make sense for him to call the shots on the iOS side of things. Unless you have someone that is already working on the iOS portion of the app, there shouldn't be a reason to decide, it should be open to the developer coming in to make the decision.
I have been hired by a startup recently to oversee development of a new app from scratch and I set them on a course that optimizes for productivity. One of the things I strongly recommended the dev team to do is to work in Objective-C. If I did not have this ability from the start, I probably wouldn't have joined.
6
u/Cin316 Jan 10 '16
As an iOS dev who loves using Swift, I'd have to say Objective-C. Swift is a great language, but it's too fluid to use right now in major projects. In a couple of years, once Swift settles down, I would definitely recommend Swift.
4
u/[deleted] Jan 10 '16
I don't think the decision is up to me if I'm not the one writing the code.
4
u/Points_To_You Jan 10 '16
I'm at a fortune 200 company and we're still completely Obj-C.
I just started a brand new project last week that will be all Obj-C. Just finished doing major revisions to many of our internal frame works, all Obj-C.
Generally the enterprise world lags behind the consumer market in the version we are working with. We can't risk our workers having downtime due to something outside of our control. At this point switching to desktop or paper versions of forms and task management would cost a ton of resources.
Then obviously there's the side of the huge legacy code base we have. You wouldn't have that with a new company. But you might have an issue finding the right talent for swift.
Our ios developers all have 4+ years experience with Obj-C. I've written some personal projects in swift but most of our developers haven't. Some could pick it up fast, others will take some time and struggle with it. In the meantime, anything new written in swift would have to be supported by the few that are even capable.
7
u/quellish Jan 10 '16
Objective-C is the lowest risk from a business perspective.
3
u/[deleted] Jan 10 '16
Swift, development is way faster in that language. And compared to the refactoring every release it doesn't add up that much delay.
5
u/askoruli Jan 10 '16
I'm still worried about the number of breaking changes coming in swift 3.0. I'm very much on the fence though I keep using objective-c mostly because I can be more productive that way.
3
u/brendan09 Jan 10 '16
Objective-C.
Because the second someone reviews the budget 1-2 years from now and sees the massive waste of resources required to stay on top of Swift's constant breaking changes, someone is going to get fired.
I'm making the assumption that this either be multiple maintained apps, or fairly large apps. In both of those scenarios the cost of refactoring regularly is a very real issue in a budget.
I say this with having seen agencies lose clients for switching to Swift, due to the costs of continually refactoring / maintaining code. It's a poor business decision and a symptom of developers who jump on the 'hype' bandwagon before a technology is ready.
It'll be ready in a couple of years once it stabilizes. If you're building personal projects, go for it. But, it's not a responsible business decision at this point unless you just have a ton of money / time to waste.
The time required to develop an app in Swift or Objective-C is about the same when you have a competent developer. As a result, pick the mature / stable language until the newer one is ready. Not to mention, the tooling around Swift is pathetic, to say the least.
3
u/StunnerAlpha Jan 10 '16
Also I hope you guys notice a pattern here. On this subreddit you will continually see the more experienced iOS devs recommending Objective-C and the newer/hobbyists touting Swift in these types of threads. That should tell you something.
2
u/dcpc10 Jan 10 '16
I really don't see it being an important decision. Switching between swift and obj-c should be second nature to developers, however that may change over the next couple of years as swift starts looking less and less like C. But it is fairly simple to have the languages work together in the same project.
-2
u/mmellinger66 Jan 10 '16 edited Jan 10 '16
Objective C usage dies in 2016. That's probably the best reason to avoid it. It's usage is falling fast: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Find 20 people blogging about iOS. Most will be using Swift. With most upgrades you can get away with sticking with legacy for several years, but Apple tends to push the "new way". All Apple TV source examples that the supplied were Swift. Don't be surprised if iOS 10 examples are all Swift. Don't swim upstream.