Apple has a lot of open source efforts, but none as big or important as Swift. In announcing Swift as an open source project at WWDC earlier this year, Apple’s Senior Vice President of Software Craig Federighi said it would be the language we use for the next 20 years.
I recently spoke with Federighi to discuss some of the finer points of Apple’s latest open source effort, and where Swift (along with the developer community) is headed.
Win a trip to Amsterdam!
We've teamed up with Product Hunt to offer you the chance to win an all expense paid trip to TNW Conference 2017!
The Next Web: Why did you open source Swift?
Craig Federighi: We think Swift is the next major programming language; the one people are going to be programming in for the coming several decades. We think it’s a combination of it being a great systems and apps programming language that’s fast and safe, but also being really expressive and easy to learn.
It’s the perfect programming language for anyone who is learning to program all the way to writing systems. We want everyone to learn Swift as their primary language, and we want — when developers invest in Swift — to be able to use it everywhere from scripting to apps for mobile down to writing code in the cloud.
We think the best way to enable all of that is to open source it.
Why did you decide now was a good time to open source Swift? The language is still very young and dynamic.
In part because everything with Swift has happened at such an incredible pace. We love Swift, and we thought our developer community would love it too, but the reception has blown us away.
People are investing in Swift right now. There’s a demand and a need to make it available. At the same time, we feel Swift is at a state of — while it’s still an evolving language — readiness, and now is the right time to bring it out into the open.
We knew when we released Swift 1.0 that it would not be the right time. As we were working on Swift 2.0, we knew we were working toward a point of stability where we could open source it. When WWDC rolled around, we realized we were ready, and this was the year to make that happen.
Apple released Swift under the Apache 2.0 license. You’re posting the code to GitHub, but also have a dedicated website for Swift. How does Apple plan to support the developer community with this open source effort?
We wanted to make sure we had a standard and permissive license that was well recognized. We added a runtime exception to make it even more permissive so that people don’t have to worry about embedding attribution of the write programs that use Swift and embed the runtime.
So this is a true open source project in every sense. It’s being developed out in the open, and all the code is up on GitHub. All of our development, day to day, is happening in the repository for everyone to watch as it unfolds.
Future language direction, like things we plan to do with Swift 3.0, are also being announced to the community today on swift.org.
We expect that many will contribute, and we’re open to patches from anyone. Ultimately we expect to have a strong set of contributors from outside Apple working on the project.
I think the Apple developer community has already seen that the Swift team is really open and has been taking feedback since the moment Swift was released. Even some of the changes made in Swift 2.0 were heavily influenced from developer feedback [on Swift 1.0].
Now with Swift development occurring out in the open, I think we’ll see that taken to a different level.
Where should developers seek interaction from Apple: GitHub or swift.org?
We see swift.org as a sort of initial hub. If you go there, it directs you to things like the ‘getting started’ guide or a download for the current build of Swift for OS X, iOS, tvOS and Linux. It also has overview content about the project and sub-projects, and links off to the Git repository where all the source code is.
[Side note: swift.org is where developers should file issues or comments, while the code hosting is done on GitHub. Filing patches would need to go through GitHub, and compiler issues should get their own Radar via the Apple Developer portal.]
Where does this leave Objective C?
Objective C is forever. I don’t think anyone should fear for the future of Objective C. We’re going to continue to support Objective C for ourselves and the developer community.
We think Objective C is still a great language, and Apple has an investment in many many millions of lines of Objective C, and that’s not going to change.
At the same time, we do think developers new to our platforms that need to pick a language to learn, and write an app, Swift is the right place to start and invest. The productivity advantages and power of Swift are where we think new developers should focus their energies.
Was part of open sourcing Swift to aid enterprise?
As people become invested in Swift and train their enterprise developers in building the client-side mobile apps in Swift, the developers love it and want to take those skills and even share some of the model-level code from their applications and run it in the cloud — and they want to do it in Swift. They’re seeing the advantages of the language.
IBM has been a major source of that feedback for us, and they’ve been eager since they got started with Swift, saying “how can we take these applications we’re writing for enterprise all the way from the mobile platform into the cloud?”
So open sourcing and having a runtime that can run on Linux is going to make that possible in a big way.
Finally, what do you hope an open source Swift will accomplish? Similarly, do you have any concerns about it being open?
In terms of where we hope the open source project will take Swift, it comes back to the original goals of making Swift the language you learn to program in from the outset, and know that when you learn it you’ll be able to use it to accomplish everything you want to accomplish, all the way from building mobile applications to cloud development. Open sourcing it creates a really clear path to what was already starting to happen.
If a university wants to revise their core curriculum and start teaching programming in Swift, it being open source really makes that an easy decision for them to make.
If you’re a developer thinking “hey, can we go Swift front to back?”, now they have it.
Where we expect the community to really push is the cloud framework, and we think there will be a lot of energy to adapt Swift into the datacenter. There’s a lot of good work to be done there, and we feel the community is in the best position to do that.
We can see all kinds of specialized Swift toolkits being created for big data, machine learning — you name it, I think there will be a really vibrant community around all of those things.
Ultimately, this kind of energy will create even more focus around tools that will even benefit developers on Apple’s core platforms.
We didn’t have significant concerns about where we didn’t want developers to take it. We say “the more Swift, the merrier.”