Apple dropped a bombshell at its Worldwide Developer Conference (WWDC) Monday, though only developers heard the explosion. The company introduced Swift, a new programming language that offers an alternative to creating OS X and iOS apps in Objective-C.
Objective-C has been Apple's programming language of choice for years. As an object-oriented language based on C, Objective-C is powerful but complicated. Its verbose nature and unintuitive structure -- particularly when wedded with Apple's Cocoa frameworks and Xcode integrated development environment -- have stymied many less experienced developers, driving them toward friendlier cross-platform development tools or less daunting programming languages.
Apple's ban on Adobe Flash in 2010 can be seen in part as a reaction to the fact that Adobe's development technology, for all its flaws, had a lower learning curve than Apple's and had attracted enough developers to threaten native development for Apple products.
[Learn more about Apple's reveals at WWDC Monday. See Apple OS X, iOS Draw Closer.]
With the launch of Swift and related graphics acceleration technology like Metal, Apple aims to make its native development tool chain more appealing. By lowering barriers to entry into its ecosystem, Apple is trying to attract more developers and encourage them to create apps that work exclusively on Apple hardware.
The company has already had considerable success in that regard: Apple has over 9 million registered developers, according to CEO Tim Cook, who noted that more than 50% of those have signed up in the past year.
Facebook, Google, and Microsoft have all created programming languages that enhance their platforms: Facebook has Hack; Google has Dart and Go; and Microsoft has TypeScript and C#.
Swift has a more narrow focus at the moment: It is designed to be used with Apple's Cocoa and Cocoa Touch frameworks. At some point, if Apple allows the creation of the appropriate middleware, it may be useful for writing apps that work with other frameworks, platforms, or hardware. But for now, Swift is only useful for Apple devices.
Swift promises greater security through type inference, restricted direct access to pointers, and automatic memory management -- all of which reduce the potential for vulnerable code. It also promises greater speed than Objective-C. Apple claims code written in Swift runs about 1.4x faster than equivalent Objective-C code. Both Swift and Objective-C depend on the same LLVM compiler.
Swift also works with Xcode's new Interactive Playgrounds, which help developers understand what they're creating by running code on the fly.
Walter Luh, CEO of Corona Labs, maker of cross-platform development tool Corona SDK, said in a phone interview that many Objective-C developers believe the language has developed a lot of cruft over the years and will welcome Swift as a fresh start. He also sees it attracting new developers who wouldn't have considered writing apps in Objective-C. He doubts Swift will threaten cross-platform tools because he believes developers will continue to want their code to run on multiple platforms.
Luh expects that Apple will focus its energy at its developer conference on trying to demonstrate the value of Swift. "Any time you introduce a new programming language, you need to provide a compelling reason for developers to use it," he said.
What do Uber, Bank of America, and Walgreens have to do with your mobile app strategy? Find out in the new Maximizing Mobility issue of InformationWeek Tech Digest.