Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼


Apple Swift New iOS and OS X Programming Language

Apple has announced Swift, a new programming language for iOS and OS X. Designed for Cocoa and Cocoa Touch, Swift combines the features of compiled languages with the simplicity of popular scripting languages. The company says that Swift eliminates "entire categories" of common programming errors as it also coexists with Objective-C code, so developers can integrate Swift into their existing apps.

"Xcode Playgrounds make writing Swift code interactive by instantly displaying the output of Swift code.
 iOS 8 also includes Touch ID APIs enabling developers to authenticate users within apps, protect logins and user data, and unlock keychain items. With iOS 8, developers can provide authentication with a successful fingerprint match while keeping your fingerprint data safe and protected in the secure enclave," said the company.

A beta version of Swift is available immediately for iOS and OS X Developer Program members at developer.apple.com. The final version will be made available this fall, and apps written in Swift can be submitted to the App Store and Mac App Store when iOS 8 and OS X Yosemite are released.

Swift was built to be fast. Using the high-performance LLVM compiler, Swift code is transformed into optimized native code, tuned to get the most out of modern Mac, iPhone, and iPad hardware. The syntax and standard library have been tuned to make the most obvious way to write code also perform.

Olly Berry, head of iOS at mobile application development company Mubaloo spoke to Dr. Dobb's directly to say, "From what we saw briefly in the keynote, it looks like it should be pretty quick for iOS developers to pick up Swift. In many respects, it appears to be a natural evolution in programming terms from Objective-C. I don't necessarily think it's going to be any easier to learn than any other modern programming language, so novice developers will still have to go through training."

Berry continued, "My early feeling is that it won't make developing apps much quicker; it will, however, give us powerful new ways to write better code that compiles and runs faster; it won't slow us down. Swift should tighten the feedback loop between writing code and seeing its effect in real time and allow for faster prototyping. I'll be encouraging my team to start learning Swift immediately so we're all up to speed by the time iOS 8 is released, and of course we'll be able to use it side-by-side with Objective-C/C anyway."

Dr. Dobb's newsdesk wanted to hear more. We spoke to IDC software application development favorite Al Hilwa. "It is the golden age of the programmer, so it must also be the golden age of programming languages. Computer scientists never tire from creating new languages and this is illustrated by Apple's latest creation called Swift."

IDC's Hilwa continued, "There have not been too many examples of single-vendor-promoted languages achieving wide adoption. Most of the popular programming languages that have come to widespread use, like COBOL, FORTRAN, C, and Java, have had multi-vendor support. Objective-C was catapulted into fame by the unique disruption of Apple's iPhone, and C# was promoted by Microsoft during its pinnacle of dominance as the language for Windows apps."

Would Apple's new Swift be as successful asks Hilwa? That depends on how hard Apple pushes it and how much of the Apple ecosystem apps are still to be written versus have already been written.

He says that Swift has a good chance of being dominant in five years. Programming language skills are hard-earned by developers who invest a lot of time and effort to master. Hilwa's opinion is that the reality is that Objective-C is outdated and complex for new developers, but Apple has worked hard to make great tools for developers and the pull of the platform has been compelling. So compelling in fact, that many Apple developers will likely continue to use it for a long time to come.

"It helps Swift that it was designed for ease of learning, that it produces fast code, and that Apple will integrate it deeply with its tools. But, having looked at it briefly, I can say that despite its many great features, it has a 'best-of' flavor which combine many great ideas surfaced in other successful languages, like Java, JavaScript, and C#. This typically means it has a complexity that may make it easy to learn but hard to master. Still, if a single vendor can generate wide adoption of a programming language today, it is Apple as it sits at the pinnacle of its platform dominance," added Hilwa in his capacity of program director for software development research at IDC, Seattle.

Apple also released its iOS 8 SDK with more than 4,000 new APIs. The firm has promised major extensibility features like Notification Center widgets and third-party keyboards — iOS 8 also includes Metal, a new graphics technology that maximizes the performance of the A7 chip.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.