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.

One point I'm concerned about is, for example, libdispatch. As you may know, that is the basis for concurrency with methods such as dispatch_async... If you look at its open source page on macforge it hasn't been updated in about 3 years. The bugtracking system is a wasteland of spam. The status of mdnsresponder isn't really any better. I don't know of any other repository that apple would be using for these projects. A github search yields a collection of unofficial repos of variable recency and relevance.


I love swift, and I'm eager to let my C skills atrophe, but I'm pretty worried about the level of support that the open source port will get. I'm feeling like it's going to just sit around and rot. 😟 Even if the language itself is updated (the LLVM/CLANG teams seem to do better) the other stuff that will make it useful, like libdispatch, will be severely limiting. Remember that without Foundation, the swift standard library can't really do anything.

Swift will very likely go to the LLVM team. It is the logical choice with many of the Apple DevTool people beeing important members there, too.

Yah, I'm certain the Swift will be with the LLVM team (which started with Chris Lattner, I'm pretty sure). I just worry about the other stuff that makes it work, like libdispatch and mdnsresponder.


Also, does anyone have an idea how bridging the POSIX libraries into Swift will work?

You're right about libdispatch, but I wonder how much use it's getting (outside Apple platforms) at the moment. With Swift available, there might be more interest in libdispatch and the situation might improve overall.

I've been thinking about the POSIX libraries, actually, and wondering if the initial port will include a "Unix version" of the Swift Darwin module. If it doesn't, bridging from Swift into C is easy enough that making a module for syscalls, POSIX functions, and so on shouldn't be a formidable task.

Several years ago, just after it was released, I integrated it into several of my projects. I hope it's not just me that's using it!!


Even with Swift, though, it'll still need to be there. It doesn't seem like swift is replacing it as much as it's just bridging it in. Maybe I missed it, but it doesn't seem like Swift has any other concurrency systems other than GCD or NSThread.

There are rumors of Foundation being open source later...

That would be nice. Even if not open sourced, could the at the least provide binary versions to link against? I am concerned about networking and File IO with Swift out of the gate. Are there any efforts going on at the moment to have pure Swift networking libraries on OS X/Linux? I believe that CFNetworking is open source, so that could be a start... Too much for me to take on, hoping to see something soon from the community.

I don't believe Foundation will become open source. What would Apple win with this? It would be the most stupid move possible.

I believe that CFNetworking is open source, so that could be a start

Just FYI, there have been open source versions of CFNetwork in the past, but things have evolved a lot since then. You would not want to base any modern project on that code.

[I was curious how old that code is, and it seems that it dates from the Mac OS X 10.4 'Tiger' timeframe, that is, about ten years ago.]

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Open-Sourcing Plan
 
 
Q