June 3, 2014

Swift! A new Programming Language for iOS

When we talked about Apple Inc. we see many advancements and unique ideas in their stuff. Now Apple announced a new programming language called 'Swift' which actually will replace the Objective-C, the language developers use for building the iOS and their apps.

Craig Federighi announced the new language on stage saying, “We’ve used Objective-C for 20 years, and we love it. But we wondered what we could do without the baggage of C.”

As per Federighi statement, Swift and Objective-C codes can live together in the same app, so developers can upgrade their code as they go, rather than replacing it in one go. This is really a good feature and I'm loving it.

The company says that developer will need to write less code to get Swift applications up and running. While Swift apps are significantly faster than Objective-C apps, outperforming them by over 93x.

Here are some of the highlights of the language according to Apple:

1. Closures (similar to blocks in C and Objective-C) unified with function pointers
2. Tuples and multiple return values
3. Generics
4. Fast and concise iteration over a range or collection
5. Structs that support methods, extensions, protocols.
6. Functional programming patterns, e.g.: map and filter

Apple has published an eBook on Swift, which can be downloaded for free, here. Or you can visit developer portal to learn more about swift language from here.

No comments:

Post a Comment