Swift, a programming language for distributed parallel scripting (if you’re a developer, you know what I’m talking about), can now be used to develop apps for both iOS and OS X, Apple announced during today’s keynote at its five-day WWDC developer-only show in San Francisco.
Matter of fact, Swift code can co-exist with Objective-C, which has long been the preferred programming language for iOS development. Jump past the fold for the full breakdown…
Built with the speediest LLVM compiler, Swift is native, supports Cocoa and CocoaTouch development (so both iOS and OS X development is possible), has complete Xcode support and produces the same runtime code as he much more complicated Objective-C.
What’s best, developers don’t need to choose between C for Mac development and Objective-C for iOS development because Swift supports both iOS and OS X and can co-exist with C and Objective-C code.
Why would anyone develop with Swift?
Because it’s simpler than Objective-C yet as powerful – if not more. Also, Swift allows developers to create as complex apps as in Objective-C, but with fewer lines of code. But most importantly, Swift is really optimized for speed.
Here’s a side-by-side example of an example RC4 encryption code produced in C, Objective-C and Swift.
Another example follows below.
The speed gains alone should prompt developers to consider switching to Swift. And for would-be developers who are new to the platform, Swift is tempting due to its far less steeper learning curve.
What’s more, the complete Swift guide is available as a downloadable iBooks document. And when iOS 8 launches this Fall, developers will be able to submit apps created with Swift from day one.