This article is more than 1 year old
Apple to tailor Swift into fully open-source language – for Linux, too
Version 2.0 to have free, open compiler and standard library. Hmm
WWDC 2015 Apple will release version 2.0 of its Swift programming language as open source, with the aim of getting it everywhere.
"We think Swift is the next big programming language," Apple software engineering veep Craig Federighi said during Monday's keynote address at the annual Worldwide Developer Conference (WWDC) in San Francisco. "We think Swift should be everywhere and used by everyone."
To that end, Apple plans to release the source code to the Swift compiler and its standard library, Federighi said.
Not only that, but there will be a version of the tools available for Linux, in addition to Apple's own OS X and iOS operating systems – and Apple says it would be happy to see Swift adopted elsewhere, too.
"We think it would be amazing for Swift to be on all your favorite platforms," the firm said in a Monday blog post.
Apple first unveiled Swift at last year's WWDC. Since then, it has steadily been gaining traction among developers as a replacement for Objective-C, which has been the preferred language for Cupertinian software development since the launch of OS X in 1997.
Unlike such languages as Java and C#, which execute in virtual machine runtimes, Swift is a systems programming language that compiles to native machine code. In that sense, it is similar to such other modern programming languages as Google's Go and Mozilla's Rust, which in turn owe a debt to such venerable languages as C and C++.
Until now, however, Swift has been an Apple exclusive having been developed largely by Chris Lattner with contributions from lots of other coders in Cupertino.
In its blog post, Apple said version 2.0 of Swift will offer increased performance over previous versions and will include a new, exception-based error handling model that includes familiar
#available directive will also allow developers to wrap blocks of code so that they only execute when certain features are present on the underlying OS platform, making it possible to write code that regresses gracefully on older devices.
Apple's platform SDKs have also been polished up to work better with Swift 2, so that interacting with the SDKs in Swift feels more natural.
The biggest news, however, is that Apple plans to make the source code to the language and its associated libraries available for outside contributors to work on. An independent project called Phoenix has attempted to make an independent open source implementation of the Swift spec, but this is the first time that Apple has explicitly opened its own code for the language.
Apple didn't specify under which license it plans to release the Swift source code, saying only that it will be "an OSI-approved permissive license" – so expect something like the Apache, BSD, or Mozilla licenses, rather than the Gnu GPL.
The timeline was also a bit vague, but Apple said we can expect to see the open source version of Swift 2 "later this year." ®