Skip to main content

Apple’s Swift programming language is now open source

Swift 16-9

As promised earlier in the year, Apple’s Swift team has now posted source code for the Swift compiler and standard library functions and objects. Open-sourcing Swift is a big win for the developer community as it means Swift can now be setup to run on a server and many other use cases, bringing Apple programming talent and expertise beyond ‘just’ making apps iOS devices and Macs.

Making Swift open-source also gives the developer community as a whole more confidence in the language. Theoretically, if Apple ever decided to move away from Swift (which is unlikely), the language could be picked up by others and continue development and existing codebases could continue to be supported.

Screen Shot 2015-12-03 at 15.22.42

By open sourcing the language, Apple is also inviting the community to help make Swift better, by contributing to the language itself. It is yet to be seen how open Apple approach accepting significant community pull-request however. The Swift site says the project prefers ‘small incremental improvements’.

For those interested in finding out more, check out the documentation on the Swift.org site. The code itself is hosted on a GitHub repository. The repo is currently 404ing but the code should be up shortly.

Apple is publishing code for the raw language compiler as well as the Swift standard library and parts of Foundation, which many developers did not think would happen. Frameworks like AppKit and UIKit remain exclusive to Mac and iOS app development as expected. The published ‘core libraries’ include some of the most important components from AppKit and UIKit, like a networking stack, threading, and common data types, however. Apple says these features are actually planned for official release in the as-yet-unannounced Swift 3, but is including them now for feedback in the early development stages.

 

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Mac — experts who break news about Apple and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Mac on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Comments

  1. avieshek - 8 years ago

    A slap to android, a kick to windows

    • Com Ment (@Com__Ment) - 8 years ago

      Why is that ?
      .NET, ASP.NET, c# Compiler Roslyn are all open source, as is TypeScript and many developer tools from Microsoft.
      Android is open source, Java is GNU GLP.

      • That would be because:

        1. A Judge executed a recall of all copies of MS-DOS 6 for this very reason — it included Stac Electronics compression. The list goes on. Why trust Microsoft with a CLR (runtime) .NET for any of its languages like C# (ASP.Net btw is a part of .NET :-/

        2. TypeScript is a part of Microsoft’s usual embrace, extend and extinguish philosophy: Embrace it, Promise develops they will extend it, then when threshold has been reached, extinguish it.

        3. You can find tapes of the CEO at the time giving his views on Capitalism as a joke. Not funny for those who spend a lot of time building a project.

        Anything that has to do with Microsoft Programming, .NET is a CLR (common language runtime), or a programming language such as C# should be avoided. C# is Microsoft’s primary language and Swift out-performs it by a huge factor because C# and it’s supposed to be Microsoft’s fastest besides C++.

        Hurray for Apple!

      • iali87 - 8 years ago

        @Robert Thompson
        Dude, First of all, how could you compare c# on Windows phone is amazing(DID you see the demo where a windows phone works like a complete desktop? ). So your claiming is obviously nothing more than a fan claim and is not valid.
        Second, cpp programmers knows what a joke it is when comparing any language to cpp. I could for sure write a cpp library that runs on a desktop that is slower than python running on a raspberry pie! right? BUT I can for sure do the opposite and with a lot of optimization, nothing will be able to beat cpp. Right?

      • Leif Paul Ashley - 8 years ago

        C# was java with better properties and built in event delegates. Android is Java… and java is old, period. NullPointerException anyone?

      • Avieshek - 8 years ago

        Tell me one thing, how did you add u’r twitter handle alongside u’r name right here in the comments?

    • iali87 - 8 years ago

      Your comment is funny.

      • avieshek - 8 years ago

        ‘M interested to make friends from international borders and if you like too and have social sites, let me know.

    • iali87 - 8 years ago

      Sift is great but I don’t see its uses anywhere other than ios dev, hopefully the community will decide that and improve it because its still new and miss a lot of stuff.

      • avieshek - 8 years ago

        Give it time, we don’t ‘ve to worry ;D

      • Leif Paul Ashley - 8 years ago

        er – no it’s not.

    • Leif Paul Ashley - 8 years ago

      Not really… a win for both IMO – just use swift, it’s open source. If anything, Android needs this. Windows… doesn’t matter no one is buying them.

    • Zack Casey (@Zc456) - 8 years ago

      No one is slapping or kicking anyone. The programming languages both Android and Windows use are open source too and have been well before Swift.

      • Avieshek - 8 years ago

        How did u add u’r twitter handle right here in the comments alongside u’r name?

  2. AeronPeryton - 8 years ago

    Excellent news.

  3. m_gol - 8 years ago

    swift.org is down.

    • rnc - 8 years ago

      It’s not, it’s just slow because of the demand.

      • m_gol - 8 years ago

        Nope, it was definitely down.

  4. Joe (@JoeC128) - 8 years ago

    Excuse me, but does this mean that even windows users now can write apps for iOS / Mac ?

    • butskristof - 8 years ago

      I don’t think so. It just means that you now can write Windows or Linux software in Swift. Technically, you could compile other software now on a non-OS X machine, but it’ll probably use OS X-specific frameworks causing it not to work.

    • Leif Paul Ashley - 8 years ago

      Yes, you just have to buy a Mac :)

      • Rolf Schlup - 8 years ago

        Who would want to program anything in Swift unless they had to. I’ve developed with it for more than a year and, if anything it’s a step backwards from Objective-C. The syntax is not logical.

    • Avieshek - 8 years ago

      Excuse me, how do you add twitter handle alongside u’r name right here in the comments?

  5. weakguy - 8 years ago

    Woohoo! It sure is a good time to be a developer!

  6. rnc - 8 years ago

    Someone please make a source code formatter.

    (I don’t have the skill)

Author

Avatar for Benjamin Mayo Benjamin Mayo

Benjamin develops iOS apps professionally and covers Apple news and rumors for 9to5Mac. Listen to Benjamin, every week, on the Happy Hour podcast. Check out his personal blog. Message Benjamin over email or Twitter.