Apple Gives Open Source a Swift 2 Kick

13:00

apple-swift-2-programming-language-open-source

Apple this week announced Swift 2 and said it would open-source it later this year. Swift 2 is a programming language for iOS, OS X and watchOS.
It has a new error handling model that works with Apple SDKs and NSError. Two new features in Objective-C -- nullability annotations and generics -- make Swift 2 work better with Apple SDKs.
"Generating higher-quality code is the central problem in software engineering, and anything that helps developers do that will help," said Al Hilwa, a program director at IDC.
Swift is "a modern language where memory management is internalized," he told LinuxInsider. "Having features that further reduce errors and allow writing of cleaner, more readable code is always welcome."

Hot New Stuff

The most important new features in Swift 2 include increased performance and improved optimization, as well as a new exception-based error handling system that features "throw," "try" and "catch" keywords, like Java and other languages, noted Bill Weinberg, senior director of open source strategy at Black Duck Software.
Others are use of the "#Available" keyword to discover properties of the underlying OS, easier transition across OSes and versions, and new platform-optimized SDKs -- primarily for current Apple devs.
A Linux port is slated to appear later this year. Key attributes devs should look out for, according to Weinberg, include choice of IDE, if any; support for Android; completeness of the port compared to Swift's native implementation under OS X and iOS; and volume of platform-specific code.

FOSSing Swift

Apple will release Swift 2 to open source under an OSI-approved permissive license. It will contribute ports for OS X, iOS and Linux at launch, and source code will include the Swift compiler and standard library.
Using the permissive license "would make Swift friendly to many commercial entities, but could also make it easier to fork the project and the language," Black Duck's Weinberg told LinuxInsider. "Community voices are already singing the praises of Apple's move."

Swift is among the top 25 programming languages, and open-sourcing it "will reduce friction to adoption by ushering the language into other platforms," Weinberg said.
Linux "is a logical target" for Swift, because "it's the platform of choice for new development, and where other next-generation languages were born, and where they're percolating today," Weinberg noted, in addition to being "a close sister operating system to OS X."
How open-sourcing Swift will impact the nascent Phoenix project, an attempt to implement the Swift spec as open source without the benefit of Apple's purview, remains to be seen.

You Might Also Like

0 comments