Open-Sourcing Plan

My greatest wish for WWDC was that Apple would announce that they're open-sourcing Swift. I tuned into the live stream from, literally, the middle of Yellowstone National Park, where bandwidth is pretty hard to find, just hoping to hear that—and I got my wish. I couldn't be happier.


What's a little obscure, though, is the announcement that Apple will be doing a port to "Linux". Do you mean that literally, that your release will be Linux-specific, and someone else will have to port it to BSD? Does that further mean Swift won't simply be part of LLVM?


When I can use Swift on FreeBSD I'll be very happy, so I'm eager to know the answer to that.

My theory on this is that Apple uses Linux in it's datacenters so a native port is usefull to write servercode in it.

Linux is also easier since it is much further along the road with the LLVM support.


Google had been working on an LLVM implementation for Visual Studio as a plugin with compatibility, and now Microsoft is working on some LLVM implementation.... but as far as I know it is not as mature. Swift has a dependancy on the LLVM.

During the PSOTU, they said they were "kick-starting" the effort with a Linux port of the compiler and standard library.

Wont open source now mean that we will no longer have a solid structure to the language. Making it harder to get support if we are all using different variants of the available classes? Its bad enough following SO posts when people make unnecessary extensions.


Why specifically do we you think open source will be a good idea

I don't think we have to fear that Apple loses control of the language. Open sourcing doesn't mean giving away control or has Java left the control of Sun/Oracle because it got open sourced? Guido Rossum still has much power in Python as has Matz with Ruby.

Linux is probably the most versatile piece of software ever written. It runs on everything from battery-powered SOCs to data centers, powering huge amounts of our modern technology infrastructure as well as paving the way for us to get here in the first place. You can hack it on to an old iPod, or even household appliances like washing machines. And they've done it all without charging for their work.


Any software engineer has to respect what they've accomplished and brought to the world. Even just the act of developing the project has led to amazing spinoff tools like Git.

"harder to get support if we are all using different variants of the available classes"


What classes are you talking about? Apple will only be releasing the compiler and standard library.

How is Linux "much further along the road" with LLVM? FreeBSD is using LLVM/clang as its primary compiler. They don't even ship gcc any more. The compiler-rt blocks runtime and libdispatch both are solid on FreeBSD.

Yeah, I heard that and my question is whether they literally mean "Linux" or whether, as in so many other contexts, they are using "Linux" as manager-speak for "Unix".

Why specifically I think open-source is a good idea is because it means we'll be able to use it on non-Apple platforms.


So, you could, for example, write your server-side code in Swift.

That is exactly my theory. I think Apple plans to do its servercode in Swift and the servers run probably Linux.

I talked about Linux and Visual Studio / Windows. How did you get the idea I was saying LLVM was much further along with BSD which I did not mention. LLVM is coming to windows by Google and now Microsoft - but Linux is much further along than .... Windows

Because I specifically mentioned BSD, and no one mentioned Windows. I couldn't possibly care less about Windows.

You might be right that it is part of the reason. But they didn't have to make it open source for that reason alone. Nothing prevented them from keeping their Linux port to themselves.


You make it open source if there is a benefit in either driving adoption or in faster and more efficient testing and bug fixes. Swift probably reached a plateau in adoption and was surely straining their resources in testing and bug fixing given its evolution history. Now they can deploy more of those testing and maintanence resources into Xcode (which is falling behind in capabilities relative to the latest IDEs in my opinion) as well as Apple SDK support.

In some ways, porting to BSD would be simpler than porting to Linux, given Darwin's heritage. Having said that, they are most probably targeting the most popular *nix for their initial port, leaving the porting back to BSD up to the community. I doubt it will be a hard process, with Linux needing probably a little more #ifdefs than the other way around.. Once Swift open sources, it will in fact be the first thing I'll do with it: trying to port it to FreeBSD 😉

Open-Sourcing Plan
 
 
Q