Printed from http://www.electronista.com

New programming language 'Swift' for iOS, OS X announced during WWDC

updated 04:18 pm EDT, Mon June 2, 2014

Language works with C, Objective-C, developers can see changes on the fly with Xcode

To a loud roar of applause, Apple announced that it has developed a new coding language for iOS and OS X during the WWDC keynote. The language, called Swift, will allow for a simplified coding process that will continue to play with C and Objective-C languages in the same applications. Swift will also allow developers to make real-time changes in their programs, seeing the changes they make in the code show up in an active build with Xcode.

"We've used Objective-C for 20 years, and we love it. But we wondered what we could do without the baggage of C," said Craig Federighi during the keynote.

The new language marks a departure from a structure that Apple has been using, pushing to make the act of coding a simpler process. Swift is designed in a way that it is native to Cocoa and Cocoa touch. The code is said to be faster, marking up to 93 times faster in some applications over Objective-C. New features in the language include inferred types, unification of closures and function pointers, multiple return values, generics and functional programming patterns.

Swift has the possibility to replace Objective-C as the main coding language used in iOS and OS X apps. However, rather than pushing developers straight into a new language, Apple has said that Swift will work with both C and Objective-C in the same applications. This means that knowledge won't need to be replaced immediately, but rather implemented as developers pick up on the new code standard.

The ease of Swift is a large change for Apple software development, as the amount of coding required is being cut down. A more refined, simplified system of code will come into place with Swift, giving developers an easier time. Coding is set to become "safer and more reliable," since a large number of category errors can be removed. Variables will be introduced before use and syntax has been refined.

However, there is also a bonus to those who wish to learn development by doing code when paired with changes in Xcode. People will now be able to see their changes much faster, lessening the gap in learning. With the addition of Xcode Playgrounds, developers will be able to see their changes in real time, no longer having to wait for long test builds to see the results. This will aid with finding problems in code structures, loops and failures in closing off lines.

During the presentation, Federighi said that Swift apps would be available from day one, leaving no reason for developers to wait and see how the language pans out. Those wishing to look into Swift can download a book from Apple on the language on iTunes. A beta version of Xcode with Swift is available now.



By Electronista Staff
Post tools:

TAGS :

toggle

Comments

Login Here

Not a member of the MacNN forums? Register now for free.

toggle

Network Headlines

toggle

Most Popular

Sponsor

Recent Reviews

Dell AD211 Bluetooth speaker

For all of the high-priced, over-engineered Bluetooth speakers in the electronics market, there is still room for mass-market solution ...

VisionTek 128GB USB Pocket SSD

USB flash drives dealt the death blow to both the floppy and Zip drives. While still faster than either of the old removable media, sp ...

Kodak PixPro SL10 Smart Lens Camera

Smartphone imagery still widely varies. Large Megapixel counts don't make for a good image, and the optics in some devices are lacking ...

Sponsor

toggle

Most Commented

 
toggle

Popular News