Apple's 'Swift' is a new programming language for iOS, Mac
Developers at the Apple WWDC event enthusiastically applauded the introduction of the new Swift programming language
IDG News Service - With plans to slowly retire the long-used Objective-C, Apple has introduced a new programming language, called Swift, for designing apps and applications to run on Apple iOS devices and Apple Macintosh computers.
"Swift is fast. It is modern. It is designed for safety and it enables a level of interactively and development you've never seen before on the platform," said Craig Federighi, Apple senior vice president of software engineering, who introduced the language to the surprise of the audience at the company's Worldwide Developers Conference, being held this week in San Francisco.
Federighi explained that Swift was designed to eliminate entire categories of common programming errors. It includes modern constructs such as generics, closures, type inference, multiple return types, operator overloads and other time-saving capabilities that developers have wanted to see in their languages.
Many Apple developers expressed cheer at the news of Swift. The WWDC audience applauded thunderously upon Federighi's introduction to the language. The enthusiasm is understandable given the shortcomings of the aging Objective-C, which was created in the 1980s and came to Apple by way of Steve Jobs' NeXT workstation company, purchased by Apple in 1996.
On Twitter, one programmer expressed satisfaction that Swift could treat emojis -- electronic smileys formatted in unicode -- as variables. Another posted a picture of a Objective-C programming book that had been tossed into a trash can.
Although Apple has done a commendable job of maintaining the language, and its developer ecosystem, Objective-C still suffers from undue complexity in many ways, noted Al Hilwa, program director for software development research at IDC. Objective-C was based on C, a programming language which on its own is difficult to master. Secondly, the approach that Objective C takes to passing messages between an application or within an application is difficult to learn as well.
Swift has all the power of Objective-C, but without the "baggage of C," Federighi told the audience. He compared some benchmarks that showed Swift code running faster than Python and just as quickly as Objective C.
Swift may be easier to learn and work with, but it will still take developers time to switch from Objective-C, Hilwa speculated.
Apple is working to make the transition easier, though. Swift code can be run on the same run-time as Objective-C, and uses the same memory management module. It also can use Objective-C's Cocoa libraries. "Your Swift code can fit along side your Objective-C code and C code in the same application," Federighi said.
Apple is updating its Xcode IDE (integrated development environment) to include a feature called Playground, which allows the developer to inspect the output of code as soon as it is typed in.
Swift does not appear to be related to another language with that name, designed for writing scripts to run in parallel computing environments.
- Apple unwraps OS X Yosemite public beta Thursday
- Dev interest in OS X Yosemite is 4X what it was for Mavericks in '13
- Yosemite's 'Handoff' will work only on Macs less than 2-3 years old
- Headphone makers will be wary of Apple's Lightning audio pitch
- Devs can 'Handoff' iOS apps to browser-based UIs on Macs
- Apple's storage strategy: Clear, not cloudy
- Apple's Continuity tack brings ubiquitous computing to Yosemite and iOS 8
- What's in a name? Aussie 'HealthKit' firm unhappy with Apple
- Will Apple's Internet of Things vision hurt a beautiful idea?
- Apple returns to beta testing with Yosemite, just as Microsoft downplays the ritual
- Planning for Mobile Success Many organizations are seeing clear and quantifiable benefits from the deployment of mobile technologies that provide access to data and applications any time,...
- The Business Value of Continuous Delivery Download this whitepaper to learn more about the business value of Continuous Delivery and see why it could be a game changer for...
- Coding with JRebel: Java Forever Changed With JRebel, developers get to see their code changes immediately, fine-tune their code with incremental changes, debug, explore and deploy their code with...
- Ten Factors Shaping the Future of Application Delivery Download this research report conducted by Enterprise Management Associates (EMA) to learn how those that are seeking to accelerate application delivery are leveraging...
- What Does it Take to Deliver a Superior Customer Experience? The Two Top-Rated Online Retailers, B&H Photo and Crutchfield Electronics, Share Their Secrets Discuss practical CX tools and service methods such as contact center agents and the use of realtime speech analytics to help contact center...
- Keep Servers Up and Running and Attackers in the Dark An SSL/TLS handshake requires at least 10 times more processing power on a server than on the client. SSL renegotiation attacks can readily... All App Development White Papers | Webcasts