Apple unveils Swift programming language

New language emphasizes speed and interactivity for building OS X and iOS apps

Apple has a new programming language, Swift, intended to provide modern programming capabilities for Apple application development and streamline the building of applications.

Featured as part of the Xcode 6 IDE (now in a beta release) and introduced this morning, Swift is a language for the Cocoa and Cocoa Touch frameworks for OS X and iOS.

"Swift is fast, it is modern, it is designed for safety, and it enables a level of interactivity and development that you've never seen before on the platform," said Greg Federighi, Apple senior vice president for software engineering, in introducing Swift at Apple's World Wide Developer Conference in San Francisco.

The concept behind Swift involves developing a language like Apple's favored Objective-C language but without the baggage of C, Federighi said. Swift features such capabilities as closures, generics, multiple return types, and namespaces, and Swift code can fit alongside Objective-C and C code. "Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast," Apple documentation states. "Swift is ready for your next iOS and OS X project -- or for addition into your current app -- because Swift code works side by side with Objective-C."

Swift, Apple said, resulted from the latest research on programming languages combined with experience building Apple platforms. The language uses the LLVM compiler, with Swift code transformed into native code. Named parameters brought from Objective-C are expressed in a clean syntax, making APIs in Swift "even easier to read and maintain," Apple said. Inferred types lead to cleaner, less mistake-prone code, modules eliminate headers and provide namespaces, and automatic memory management is featured.

Developers can use Swift code immediately to implement new application features or enhance existing features. When iOS 8 and OS X Yosemite -- new OS releases also detailed today -- are released this fall, developers can submit apps using Swift to the App Store and Mac App Store. Tutorials for using Swift are included in the Xcode beta release.

Apple's new language is a "big deal," said analyst Frank Gillett, of Forrester. "It promises to make it easier, more accessible, and faster to develop secure and compelling apps."

This story, "Apple unveils Swift programming language" was originally published by InfoWorld .

Join the discussion
Be the first to comment on this article. Our Commenting Policies
See more