Follow Us

We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message

Apple unveils Swift, a new programming language for iOS, Mac

Developers at the Apple WWDC event enthusiastically applauded the introduction of the new Swift programming language

Article comments

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.

Apple designed Swift to be as intuitive and easy to use as popular interpreted languages such as Python and JavaScript, while maintaining the speed and flexibility of compiled languages such as C++.

"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 Apple CEO Tim Cook, who introduced the language to the surprise of the audience at the company's Worldwide Developers Conference, being held this week in San Francisco.

Cook 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 Cook'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," Cook 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," Cook 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.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com



Share:

More from Techworld

More relevant IT news

Comments



Send to a friend

Email this article to a friend or colleague:

PLEASE NOTE: Your name is used only to let the recipient know who sent the story, and in case of transmission error. Both your name and the recipient's name and address will not be used for any other purpose.

Techworld White Papers

Choose – and Choose Wisely – the Right MSP for Your SMB

End users need a technology partner that provides transparency, enables productivity, delivers...

Download Whitepaper

10 Effective Habits of Indispensable IT Departments

It’s no secret that responsibilities are growing while budgets continue to shrink. Download this...

Download Whitepaper

Gartner Magic Quadrant for Enterprise Information Archiving

Enterprise information archiving is contributing to organisational needs for e-discovery and...

Download Whitepaper

Advancing the state of virtualised backups

Dell Software’s vRanger is a veteran of the virtualisation specific backup market. It was the...

Download Whitepaper

Techworld UK - Technology - Business

Innovation, productivity, agility and profit

Watch this on demand webinar which explores IT innovation, managed print services and business agility.

Techworld Mobile Site

Access Techworld's content on the move

Get the latest news, product reviews and downloads on your mobile device with Techworld's mobile site.

Find out more...

From Wow to How : Making mobile and cloud work for you

On demand Biztech Briefing - Learn how to effectively deliver mobile work styles and cloud services together.

Watch now...

Site Map

* *