Apple introduces a new language for programmers who write apps for OS X and iOS , the two operating systems for its flagship iPhone and MAC computers. The newly announced language is akin to Java syntactically but is mostly influenced by Objective-C. Developers can start coding in swift and in Objective-C as well as they coexist side by side. Programs written in Swift have a [dot] jif extension.
Swift takes the best features from the C and Objective-C languages. It includes low-level primitives such as types, flow control, and operators. It also provides object-oriented features such as classes, protocols, and generics, giving Cocoa and Cocoa Touch developers the performance and power they demand.
As the name suggests, Swift is indeed swift in performance and is reportedly 3.9 times faster than Python codes. The code looks natural and modern. Here's one example of Swift code:-
Swift takes the best features from the C and Objective-C languages. It includes low-level primitives such as types, flow control, and operators. It also provides object-oriented features such as classes, protocols, and generics, giving Cocoa and Cocoa Touch developers the performance and power they demand.
As the name suggests, Swift is indeed swift in performance and is reportedly 3.9 times faster than Python codes. The code looks natural and modern. Here's one example of Swift code:-
let people = ["Anna": 67, "Beto": 8, "Jack": 33, "Sam": 25]
for (name, age) in people {
println("\(name) is \(age) years old.")
}
- Safe
- Modern
- Powerful
- Interactive
- Fast
Developers can use Swift code immediately to implement new application features or enhance existing features. When iOS 8 and OS X Yosemite -- new OS releases also detailed today -- are released this fall, developers can submit apps using Swift to the App Store and Mac App Store. Tutorials for using Swift are included in the Xcode beta release.
No comments:
Post a Comment