New in OS X: Get MacRumors Push Notifications on your Mac

Resubscribe Now Close

Apple's Swift Programming Language Now Open Source

As promised, Apple has officially made its Swift programming language open source, making the project available through Swift.org.

swift_org
We are excited by this new chapter in the story of Swift. After Apple unveiled the Swift programming language, it quickly became one of the fastest growing languages in history. Swift makes it easy to write software that is incredibly fast and safe by design. Now that Swift is open source, you can help make the best general purpose programming language available everywhere.
Announced at WWDC 2014 and launched alongside iOS 8 and OS X Yosemite a few months later, Swift marks a significant step forward from the Objective-C previously favored by Apple.
On December 3, 2015, the Swift language, supporting libraries, debugger, and package manager were published under the Apache 2.0 license with a Runtime Library Exception, and Swift.org was created to host the project. The source code is hosted on GitHub where it is easy for anyone to get the code, build it themselves, and even create pull requests to contribute code back to the project. Everyone is welcome, even just to file a bug report. There are excellent Getting Started guides available here on the site as well.

The project is governed by a core team of engineers that drive the strategic direction by working with the community, and a collection of code owners responsible for the day-to-day project management. Technical leaders come from the community of contributors and anyone can earn the right to lead an area of Swift. The Community Guidelines includes detailed information on how the Swift community is managed.
With the open sourcing of Swift, Apple has also released a Linux port to expand access to the language. Apple has also begun sharing design guidelines related to the upcoming Swift 3, setting the stage for "a more cohesive feel to Swift development."

Update: Apple has published a press release announcing the news and Apple's Senior VP of Software Engineering, Craig Federighi, has done an interview with Ars Technica on Apple's decision to make Swift open source.

Tag: Swift


Top Rated Comments

(View all)

13 months ago
I've been programming almost exclusively in Swift for over a year now, and I write better, cleaner, safer code than with Objective-C. (especially with some of the additions they made with Swift 2.0) Love it.

Will be interesting to see how Swift is adopted on other platforms.
Rating: 9 Votes
13 months ago

As I see it, Swift is an inferior language in most ways to most other languages. It has one thing going for it, which Obj-C had going for it too: you can write in the language, or you can't use Apple's App Stores (which means you can't publish on iOS at all).

Making it open source might fix a pain point - now it might end up being possible to write your code once in Swift and have it run everywhere - but only if people actually port it.

IDK. I'm sticking with C# in Unity 3D for cross platform game development and Python for server side code.

I'd recommend not digging your heels in on this issue, and reconsider. Swift results in far more stable code once you become familiar with the language and some of its new concepts (which admittedly does take some time!). You'll be thankful for taking the time do learn it in the long run!
Rating: 8 Votes
13 months ago
While Swift surely has a long long way to go... Apple is moving fast, and I love it.

Swift is a breath of fresh air to code in.
Rating: 5 Votes
13 months ago
Did Taylor Swift write a letter to Apple?
Rating: 4 Votes
13 months ago

I've been programming almost exclusively in Swift for over a year now, and I write better, cleaner, safer code than with Objective-C. (especially with some of the additions they made with Swift 2.0) Love it.

Will be interesting to see how Swift is adopted on other platforms.


Yeah, I just recently started a new app, ground up using Swift. I'm following most of my existing design patterns from my older apps written in Obj-C, and the improvements (old vs. new apps) are pretty astounding. :cool:
Rating: 4 Votes
13 months ago
this is awesome news.
Rating: 3 Votes
13 months ago

Don't know what to say about this news. I knew Swift was announced to become Open Source but the fascination of Open Source has worn of quite heavily during the past ten years. So... . Let's see what this gets us. I did not had any interest in Swift so far. The same way I did not had much interest in Objective-C fifteen years ago. Nontheless All my apps of today are written in the latter mainly for the reason that Cocoa is quite an astonishing piece of work from an engineering point of view. If there would be a pure C binding for Cocoa, I would be sold forever. Unfortunately, this is pretty much the opposite direction of where Swift is leading.

I am neutral. It can't be that bad.


Probably the largest benefit to Open Source is the ability for multiple companies to collaborate on a code base without needing an explicit partnership agreement, or something similar. A great example is WebKit. There was a ton of work added by companies other than Apple. Hopefully similar things happen with Swift.

It is funny that you long for a pure C version of Cocoa. So much of the Cocoa framework was made possible by the functionality provided by Objective C.

Speaking of Objective C, it is a great language to make fun of, but most of the criticism ignores how productive it is as a language. As I mentioned, the frameworks NeXT and Apple made are great, and they owe a lot of that to the language. The combination of Objective C and its associated frameworks enable some truly great apps. Objective C may not have had all the flashy features of some other languages, but it was easy to learn, expressive, and let you accomplish a lot.

Moving on to Swift, it is technically superior to Objective C in just about every way, but it is also a more complicated language as well. It is multi-paradigm to an even larger extent than Objective C. Where Objective C mixed the procedural and OO paradigms, Swift adds functional to the list as well. Add in generics, and it starts getting more complicated. The upshot is that it gives developers many different tools to use in tackling their problems. Not all problems are best solved functionally and not everything should be an object. It is great that there is support for all of these different strategies. When Swift was first released, it was pretty rough, but credit is due to the team at Apple, they have really taken the language a long way in a short time. I am excited to see the future improvements.
Rating: 3 Votes
13 months ago
Where is Xcode for iPad Pro for developing Swift Apps on iPad Pro?
Rating: 3 Votes
13 months ago
I'm thinking about developing for iOS. I have almost zero experience with any kind of code, except for a little html in the late '90s. Is learning Swift all I would need to get started?
Rating: 2 Votes
13 months ago

Its not a bad place to start, but apart from learning the language and general programming you'll also need some time and patience to learn how to build applications for iOS.



Well, yes, that's kinda why this announcement is important. Open sourcing the language is pretty much a pre-requisite for any development of server frameworks for Swift - I don't see anything fundamental in the language that would prevent it being a great server-side language except that AFAIK it is intended to compile to native binary rather than run as a script. Odds are you could already stick compiled Swift apps in cgi-bin....

Actually you can use swift as a scripting language. It was a bit convoluted to do so before, but with the latest version of Swift its like any other scripting language. Just run "swift <file to run>" and it runs it. It has a REPL that you can also access simply by running "swift" in the Terminal. So it really could compete with the likes of Python and Ruby.
Rating: 2 Votes

[ Read All Comments ]