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

ActvContent Sync Smartband

Smartbands of all sorts are hitting the market. Some build on the buzz around fitness trackers, while others offer simpler features fo ...

RocketStor 6324L Thunderbolt 2 eSATA bridge

Like it or not, the shift to Thunderbolt is underway. The connection is extremely flexible, allowing for video and data to co-habitate ...

Patriot Stellar Boost XT 64GB USB 3.0 drive

A vast selection of USB memory sticks means that consumers can often find exactly the size drive they need in a configuration that can ...

Sponsor

toggle

Most Commented

 
toggle

Popular News