Apple plans on making its Swift programming language open source.
Later this year, the company will release the Swift source code under an OSI-approved permissive license, and encourage contributions from the community. The source code will include the Swift compiler and standard library, and hopefully feature ports for OS X, iOS, and Linux.
In addition, Apple has updated Swift (which it now calls “Swift 2.0”) with a bucket of new features, including a new error-handling model designed to work seamlessly with Apple SDKs and NSError. The Swift compiler will also display error messages if the developer attempts to use an API too new for a target OS; in addition, #available blocks will “safely wrap lines of code to only run when on the right OS versions,” according to Apple’s blog posting on the release.
Apple is positioning the open-sourcing of Swift as beneficial to all sorts of developers, not just those who work exclusively with iOS and Mac OS X. “Baked-in safety features combined with excellent speed mean it has the chance to dramatically improve software versus using C-based languages,” the posting added. “Swift is packed with modern features, it’s fun to write, and we believe it will get used in a lot of places.”
Apple first unveiled Swift at its 2014 Worldwide Developers Conference (WWDC), with the hope that its key features—including real-time outputs—would make iOS and Mac OS X accessible to more developers. Open-sourcing the language seems like the next step in that plan.