This is for business owners and technical leaders trying to deicide if they adopt Swift for their development. It will show the criteria I use to judge if Swift is right for an organization or team.


The backstory

Swift was announced with much fanfare last June (2014) at WWDC in San Francisco. Everyone ran around excited like they just saw a new puppy. But what happens after everyone is done gushing about the puppy? They pee on the rug and chew up the furniture, Swift was no different.

Apple announced Swift would be a first class citizen and pointed to it as the direction development in their ecosystem would head. A number of forward thinking companies started developing in Swift soon after. They figured Swift would improve and they would deal with the quirks as they came. Most of the these companies ran away screaming. There were bugs in the language and SourceKit frequently crashed. Swift was not ready for real development. They were right on one thing, Swift would improve.

Fast forward to 2015. Xcode support for Swift has improved greatly. SourceKit still crashes but often recovers with having to restart Xcode and debugging is improved. This leads to the question:

Is Swift a viable option for development?

Mostly yes. There are still quirks. There are bugs in the language but the core features are stable. Other headaches include incomprehensible compile errors for Generics. Xcode support is far behind Objective-C. To use Swift you should give up the idea of refactoring support from your IDE. Even with the quirks, Swift is an excellent option for new development. I’ve been working with Swift full time since November, 2014. I’m very productive with it. Stories of successful development in Swift are becoming common.

Is Objective-C Dead?

No. I started a new Objective-C project a few weeks ago. Even for those trying to be Swift purists, we still work with an Objective-C framework (UIKit). This means that even if you’re writing Swift, you’re probably making use of Objective-C functionality to interact with it.

We’re in a curious chasm right now. If you stay with Objective-C because you think Swift isn’t ready, you’re being too conservative. If you go with Swift thinking it’s as solid as Objective-C, you’re being too optimistic. But Apple is steadily moving towards Swift being ready.

Is my organization ready for Swift?

That depends. I use the following criteria to determine if an organization should start adopting Swift.

Short term ramp up

Is your organization OK with a slower development cycle while your developers learn on the job? Even with experienced devs, learning new patterns takes time and mistakes are made. Forward thinking companies are often fine with letting their devs learn on the job, but some are focused on short term production.

Your organizations tolerance for instability

Swift is still evolving. The language will change and Apple isn’t promising things will be backwards compatible. Does this send shivers up your company’s spine? Will this lead to mass hysteria when we have to replace every “as” with “as!” ?*. Know your organization’s leadership and what they value. My view is that these concerns are overblown. Even with Objective-C apps, we’re still required to make frequent changes to our apps because of new devices and iOS versions. This is part of being in an emerging industry. If you don’t want things to change, there’s always COBOL.

Do your developers like change?

We tend to think all developers love learning new things but it’s not a universal trait. Some companies are better served by developers who thrive on stability. Introducing Swift in a culture like this is a recipe for disaster or nonstop complaining.

Are your developers familiar with the new Swift features?

Most innovations in Swift have been seen in other languages like Ruby and C#. Many iOS devs have backgrounds in these languages and are excited about using these features in their iOS apps. If your team isn’t familiar with, or excited by, the new concepts they could easily start writing Objective-C apps in Swift. This is the worst of both worlds.

Legacy Concerns

Do you already have a large codebase written in Objective-C? Without a clear benefit from some of the new functionality in Swift, introducing a new language may create more confusion that it’s worth. This is more of a human consideration. There is an overhead to frequently switching between languages. I’m frequently adding brackets where they shouldn’t be and forgetting to add semicolons. But there’s no technical reason to avoid intermingling the languages in most cases. Swift and Objective-C interoperability is very good.

In summary

Both Objective-C and Swift are excellent options for developing new applications. Wether Swift is right for your next project depends on your company’s values and your teams ability to learn or adapt to the new functionality. Either approach can produce great apps.


* trick question, you shouldn’t have been using as

Leave a Reply

Your email address will not be published. Required fields are marked *