Apple dropped a huge surprise at WWDC on Monday, as it announced that it’s built a new programming language for iOS and OS X called Swift.
The new language — which is in beta until iOS 8 is released — is Apple’s replacement for Objective-C and the company explained its big decision to developers by claiming it is much faster and easier to use. Apple isn’t taking away support for the old language and applications can actually have codebases that contain both Swift and Objective-C happily.
Do business with 5,000 people
Momentum by TNW is our New York technology event for anyone interested in helping their company grow.
Feedback on Twitter has been mixed, with many praising Apple for dropping the aging Objective-C (it’s over 20 years old) and giving them the benefits of a modern programming language, but others aren’t so pleased.
Apple says that Swift has been in development for many years and will feel familiar to veteran developers while being friendlier to new developers. Swift is not only faster, but supports many modern programming conventions, such as closures, generics, type inference, multiple return types and namespaces.
Apple also said that the language is easier to learn, and to help that process it has created an ‘interactive playground’ for developers.
We talked with a few developers about the change and how it will impact them in day-to-day life.
A new Apple
Prominent iOS developer Steve Streza said that he is excited that Apple “are beginning this transition” as Swift is “modeled after the benefits of Objective-C (e.g. reference counted memory management) while putting a better syntax and style management on it.”
Streza says that Swift will “cause me to rethink how I design my own APIs, with more emphasis and thought placed in how the types are conveyed” but overall, he doesn’t expect a big impact to the way he works, once he gets over “the hump of learning to program in a new language.”
Despite the excitement, Streza says that his biggest concern is “about the ways Objective-C and Swift work with each other” because “both seem to make pretty different assumptions about how code will be written and how APIs will return data, and it’s unclear how they’ll interact when their assumptions conflict.”
Streza also pointed out to me that another concern for many is the question of whether programmers will adopt the language, as many developers are resistant to change and a rift could cause frustration for those working on the platform.
Despite Streza’s concerns, however, he says that he expects to “fully adopt Swift” and use it for apps he builds in the future and thinks that it would be “silly for any iOS or Mac developer to not have at least a basic comprehension of the language.”
Kevin Ingersoll, a web developer based in San Francisco, explained over email that “the barrier to entry looks much lower for a web developer than Objective-C, and that’s what makes me excited about Swift” and that he’s had ideas for apps but “having to invest the time into learning Objective-C was the biggest hurdle for me – that hurdle is now gone.”
Quentin Zervaas, a developer in Australia who built a popular public transport app, believes that Swift “reinforces that Apple [is] serious about making their developer tools and development workflow as easy to use, as well as looking for ways to constantly squeeze extra performance from devices.”
Zervaas is looking forward to the real-time evaluating and debugging of code using the language and thinks that it “will simplify a lot of syntax” which is good news, as he previously had to write “awkward-looking code” to get things done.
Users on Hacker news are excited, too, with nln writing that even as a non-developer the changes make him feel more comfortable starting to learn how to build apps for iOS.
Concerns about strategy
On the flip side, Mike, a Objective-C developer for over five years wrote that “[he is] kind of annoyed by the release of Swift” pointing out that he likes Objective-C and doesn’t want to learn a new language.He continued, saying that “the advantages of Swift over Objective-C are unclear to me. At first glance this looks like innovation for the sake of innovation.”
Mike says he will give the new language a shot, but is “afraid that Swift is going to be used just for the sake of it and that it won’t offer any real value” – this is where a divide could open up between ‘old-hat’ and new developers to the platform that use Swift.
It’s too early to speculate what proportion of developers will adopt Swift and under what timeline, but the excitement at WWDC was palpable; as Craig Federighi announced Swift on the stage, the audience reacted with a collective ‘woah’ before bursting into applause.
If Swift proves to be as revolutionary as Apple claims it is, then we can expect a huge shift in the way iOS and Mac apps perform over the next year.