Fulfilling a promise it made
last spring, Apple has
posted source code for the core libraries, parts of Foundation, and the raw language compiler for Swift, the company's development language -- including some features planned for the future Swift 3, but published now to gain feedback and assist in development. The move enables a number of new use cases for the language, which is deeply integrated into the company's Xcode IDE.
The change will open the language up for peer review and improvement from outside Apple, as well as the possibility of creating apps outside the Xcode environment, theoretically eliminating the need to use Macs to do iOS development, or allowing developers to run the language on a server, for example. The codebase is now hosted on
a GitHub repository, and even includes some components from Apple's proprietary AppKit and UIKit, such as threading and networking features, that are planned for the unannounced but forthcoming Swift 3, which will likely be introduced at next June's Worldwide Developer Conference.
Because Swift is backwards-compatible with Objective-C and C functions, the move to open source will also give a boost to the language's future, by allowing developers to continue development should Apple ever move away from it. Many frameworks, such as the aforementioned UIKit, remain bound to Mac and iOS development, but portions of the code that are native or exclusive to Apple's own products were expected to remain proprietary, and do not affect the open-sourcing of the language as a whole.
Although Apple will have no control over it, in publishing the libraries and code for the language, Apple has asked that developers contribute "small, incremental improvements" rather than wholesale or sweeping changes to the project. Documentation and guidelines for use of the code can be found on the Swift.org site.