THE BLOG
06/06/2014 11:12 am ET Updated Aug 06, 2014

The Problem With Swift No One is Talking About

When Apple announced the release of the Swift programming language, I got excited. I raced to my computer, downloaded the Xcode 6 beta and Apple's Swift Programming Language book, and start plugging away.

After spending the last few days with it, I have come to the conclusion that Swift is an awesome language, if you already know Objective-C. You might be like, "whaaat?? it's totally different!" and that is absolutely true. Swift is an incredible language, in that, even if you have only written a little bit of JavaScript, you will still feel right at home. In my opinion, Swift is easy to read and it combines all the best syntactical sugars of other languages. Plus, it adopts the beloved functional paradigms we see with Scala, Ruby, and Javascript. All of these things are fantastic, and Apple should certainly gloat about Swift. Writing a brand new programming language is not easy.

As much as I love Swift, I believe that you will find it frustrating if you have never worked with Objective-C. Swift touts the ability for new engineers to pick it up quickly, which is true, if all you are doing is writing functions that do 1+1, or iterating through arrays and using println to send it to the console. When you start having to work with interfaces, restful API calls, data storage, and other common day-to-day tasks, you will quickly pull your hair out.

swiftt

Seasoned Objective-C engineers will find Swift to be a piece of cake. If you are already familiar with Apple's design principles and have a deep working knowledge of the foundation framework, changing syntax from [ ] to . is a no-brainer, you will see a lot of love here and no productivity will be lost.

For developers just entering the Apple development ecosystem, I recommend not throwing away your Objective-C books just yet. In fact, I would recommend learning Objective-C before moving on to Swift. You will need a solid understanding of Objective-C in order to use Swift for creating apps, if only to translate the wealth of information that is out there for Objective-C into working Swift code.

There are a few reasons for this. The first is that even though Apple released a great new programming language, building interfaces for iOS is still difficult. New developers drawn to this language will likely be familiar with the buttery smoothness that HTML and CSS provides for creating great interfaces, and will probably spend a few days simply trying to wire up their first tableView. Apple's Xib format and storyboarding for interfaces is reminiscent of how old versions of dreamweaver used to write code when dragging div elements to the GUI editor. All of the delegations, datasources, and deeply nested layout attributes will still be the largest hurdle to the mass convergence to Swift that Apple is looking for.

The second reason that Swift will be a difficult language for engineers is the lack of community support, tutorials, and literature. Apple's book only teaches the basics of the language itself, not how to wire up views or interact with the legacy APIs. The Apple development community is huge, and the support will ramp up quickly, but remember that it took close to 30 years for Objective-C to amass the community it has, and the knowledge that has come along with it. The adoption of Swift will not happen overnight. However, some great content is already starting to surface.