Pixel Envy

Written by Nick Heer.

Swift Goes Open Source

Back at WWDC 2015, Craig Federighi stood on stage and announced that Swift would be going open source; today, Apple delivered. From the Swift blog:

Apple has a new home on GitHub located at github.com/apple where you can find all the source code for the Swift project. The public repositories include the Swift compiler, LLDB debugger and REPL, the standard and core libraries, the package manager, and other supporting projects.

Yeah, Apple’s on GitHub. And they’ve uploaded a year’s worth of activity five years’ worth of activity, which allows us to look at things like when those commits were made. Cool.

The version of Swift on GitHub is somewhere in between Swift 2 and the forthcoming Swift 3, and it includes a bunch of new stuff like an implementation of Foundation and code that looks like it’s ripe for server use. At least, that’s Craig Hockenberry’s theory, and fits with what Christina Warren reported for Mashable:

Although the nature of the open-source license and the community resources mean Swift can come to other platforms, the initial platform Apple is focusing on when opening Swift up is Linux.

On the surface, it may seem odd to eschew Windows for an operating system with much lower market share, but in the developer world, it makes complete sense.

Linux dominates the server market. Right now, developers can write their client code in Swift but if they want to write code that executes in the cloud, they need to use something else. Having Linux support opens the door to making Swift a more robust language for more than just client apps.

Additionally, Andrew Cunningham of Ars Technica spoke with Federighi about this move:

“The Swift team will be developing completely in the open on GitHub,” Federighi told Ars. “As they’re working day-to-day and making modifications to the language, including their work on Swift 3.0, all of that is going to be happening out in the open on GitHub.”

So instead of getting a big Swift 3.0 info dump at WWDC 2016 in the summer and then digging into the Xcode betas and adapting, developers can already find an “evolution document” on the Swift site that maps out where the language is headed in its next major version.

Impressive. Michael Tsai has also been collecting a good set of links and resources.