Developers proceed cautiously with Swift

Apple’s new language for iOS and OS X development is generating a lot of interest, but one experienced developer feels that caution is the best approach

A traffic sign that says Proceed with Caution
Credit: State Farm

Since its introduction by Apple last summer, the Swift programming language has generated a lot of interest from developers. A new survey by VisionMobile finds that 20% of mobile developers worldwide are already using Swift. By just about any objective measure, there’s been rapid and unprecedented growth in the number of programmers asking about, learning, and writing code in Swift.

Given that Apple has designated Swift to be the eventual replacement for Objective-C as the language for iOS and OS X development, it’s not surprising that developers have shown a strong interest in learning it. But is it a reluctant kind of interest from programmers, knowing they’ll have to learn it eventually if they want to target Apple platforms? Or is Swift attracting a new class of developers to iOS and OS X? And how do veteran Apple programmers feel about this new language?

To get a sense for developer reactions to Swift, I recently spoke with Erica Sadun, an experienced Apple developer who’s been using Swift since Day One. Sadun is also a writer, having authored or co-authored numerous books on iOS development, including the upcoming The iOS Adaptive UI Cookbook: Practical Recipes for Modern iOS Apps. She also writes a popular blog for developers, in which she regularly shares Swift How-Tos and writes about her experience with the language.

Sadun had a number interesting thoughts on Swift and how developers are approaching it. Here’s what I took away from our conversation.

Swift is still changing rapidly, though the core of the language is stabilizing

When Apple released Swift last summer, it was admittedly not complete yet, and that lack of doneness has been reflected in the constant changes in the language since its introduction. “With Swift it was pretty clear that they were building the language at the same time as they were releasing it,” Sadun said, which meant that “it was a lot creakier and newer and earlier than people expected.” She cited the compiler’s terse error message as being a particular cause of headaches. “The honest truth is that Swift can be absolutely maddening in terms of the support the compiler gives you. It takes some grit to be doing Swift development at this time.”

The good news for developers, Sadun feels, is that things are calming down a bit, particularly with the release of Swift 1.2 this month, and that the core of the language is close to jelling. “Swift is changing, but the basics, the core, the essential elements are changing less and less over time,” she told me. “Getting to the part where the essentials have stabilized is a major leap forward from last year. There has been substantial progress.”

Apple is very open to developer feedback on Swift

Given the unstable state Swift was in when it was released, Apple’s reaction to the inevitable feedback and issues raised by early adopters would be critical to a successful launch of the language. Sadun feels that Apple has done well in this area. “Apple in the last 2 years has been more open, more out-going, more responsive,” she said. “I think that in terms of developer openness and relations that there has been huge forward growth that I think is incredibly positive.”

Programmers new to iOS and OS X development should start with Objective-C

Sadun cites the unstableness of Swift as a good reason developers totally new to iOS and OS X development should stay away for now and start with Objective-C. “When people come to me and ask ‘I want to learn iOS or I want to learn OS X development, should I be picking up Swift right now?’ I will say ‘No.’ Once you’ve mastered the basics of Objective-C and Cocoa APIs, that’s when you should be turning your attention to Swift because, just in terms of cognitive loads, you really don’t want to take on two completely separate problems at the same time, learning both the language and the APIs in an unstable environment.”

Swift is attracting many seasoned developers to iOS and OS X

In Sadun's observation, Swift is helping to attract a higher ratio than normal of experienced developers to coding rookies to iOS/OS X development. “With Swift, people are coming over and saying, ‘OK, we recognize that there are modern language constructs here. We’re bringing a ton of experience in and we’re ready to jump into this arena because the language is finally evolving enough for us to be interested.’ So, you’re seeing a lot of talent come into the field,” she said. “A lot of these people are superb programmers. We’re not seeing a big influx of newbies.”

Experienced Apple developers are proceeding cautiously with Swift

Sadun explained that she hasn’t yet deployed an app written in Swift. Instead, she’s been doing parallel development, creating shadow versions of her existing apps in Swift, in an effort to build up libraries of Swift code that can eventually support her work. She doesn’t see herself deploying apps written in Swift until 2016, at the earliest.

She notes that other experienced Apple developers are also taking a cautious approach to Swift. “I think there are few people who are just diving in both feet first into full Swift operations. I think developers are taking it extremely seriously. I think that people are making rational and cautious choices in how they adopt the technology,” she told me. Ultimately, she feels this is the smartest way to approach Swift. “Some people say we’re going to stick with Objective-C for real stuff, and we’re just going to be exploring Swift for a hobby. I think that’s a very safe and sane approach.“

In a nutshell, if you’re an Apple developer who has decided to learn Swift, by all means, do so, but proceed with caution.

Related:
ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon