Swift Finally Comes to Windows

Posted on September 23, 2020 by Paul Thurrott in Dev, Windows with 30 Comments

Apple’s Swift programming language is available now on Windows for the first time, six years after it debuted on Apple’s platforms and about a year after work on this port began.

“The Swift project is introducing new downloadable Swift toolchain images for Windows,” Swift.org’s Saleem Abdulrasool writes in the announcement post. “These images contain development components needed to build and run Swift code on Windows.”

The toolchain noted above includes the Swift compiler and standard library, of course, but also the “full Swift ecosystem,” with core libraries like dispatch, Foundation, XCTest, and so on. “With these core libraries and the flexible interoperability of Swift with C, it is possible to develop applications on Windows purely in Swift while taking advantage of the existing corpus of libraries on the Windows platforms,” Abdulrasool notes.

To demonstrate this capability, Swift.org provides the source code for a native calculator application written in Swift with those core libraries. But the real goal of this project is to help developers using Swift on Apple’s platforms port their work to Windows.  Swift.org cites Readle as an early adopter, and it’s seen great success, it says.

“We released Spark for Android[,] which uses Swift to share core code with iOS/macOS, and the opportunity to extend to one more platform was really tempting,” Readle says of the port. “Despite some functionality being unready as of yet, Swift on Windows turned out to be fully satisfying our needs … After all initial concepts were proved, it was mostly routine day-to-day work to bring it alive on Windows.”

Swift.org says that it will continue updating Swift for Windows, and that this week’s milestone is just the first that it felt was ready for use. Next up is more the ecosystem support, including bringing lldb and the Swift Package Manager to Windows.

Tagged with

Join the discussion!

BECOME A THURROTT MEMBER:

Don't have a login but want to join the conversation? Become a Thurrott Premium or Basic User to participate

Register
Comments (35)

35 responses to “Swift Finally Comes to Windows”

  1. Avatar

    will

    Readdle has some of the top apps for Mac and iOS so the fact they are looking to Windows is really good. They might be one of the few companies that could be a legitimate challenger to Microsoft’s mega app....Outlook with Spark.

  2. Avatar

    Jim Lewis

    Any language that took its inspiration in part from Python can't be all bad!

  3. Avatar

    illuminated

    Language is not interesting but cross-platform UI solution is. Microsoft has an awesome C# language and .net core framework but cross-platform UI side is totally neglected. Even on windows it is not clear what to use to be future proof.

    • Avatar

      nordyj

      In reply to illuminated:

      I thought that I'd heard on a podcast at one point that Microsoft DOES want to Xamarin to EVENTUALLY be a truly cross-platform tool for UI development. On the other hand, I would personally rather see something like a solid replacement for Electron that operates on the same principle, but doesn't require a full Chromium instance per app to run it.

  4. Avatar

    erichk

    Why was Swift created, and what makes it special? Not a sarcastic question, I really want to know.

  5. Avatar

    ekim

    Well if the example above is anything to go on it looks like yet another variant of c less the line terminating semicolons. Yawn. How many of these do we really need? Seriously. Erichk's question is valid. What makes it special?

  6. Avatar

    arthemis

    Omg, this is almost like a sort of battle of the nerds. How can we port a niche language to the other guys platform that almost no one will use?

  7. Avatar

    spiderman2

    finally ... for all 12 people that asked for it


    UWP (is dead) support is coming too

  8. Avatar

    codymesh

    Love how any mobile platform can bring their various languages to PC, but not the other way around.

  9. Avatar

    matsan

    Wooo-hoo - yet another way to write Windows software... in Win32.

  10. Avatar

    ebraiter

    Wonder if anyone cares about an Apple language in Windows. Too many others to choose from.

    • Avatar

      wright_is

      In reply to ebraiter:

      You are looking at it the wrong way. It is for experienced Apple devs who want to make their applications available on other platforms, like Android and Windows. It isn't necessarily for existing Windows developers to jump ship.

    • Avatar

      ontariopundit

      In reply to ebraiter:

      You dismiss it as an Apple language and thus not interesting. You also forget that the vast majority of the globe's end-user focused developers are using that very language to develop for the iPhone!


      Beginners may prefer languages like Python and JavaScript but I suspect you'll find more professional developers using Swift. This is a positive development for Windows given that Chrome OS is going to take a bite out of Microsoft's lunch.

      • Avatar

        garrygbain

        In reply to OntarioPundit:

        Forgive me, but I think you forget that Apple only have about 14% of market share. Apple are not the go to product for developers, Android is. I agree with ebraiter, Who cares what Apple do, they're not #1 in the PC or Phone market. What is more appealing is developing on Windows and pushing to any OS. Apple have lost it, they're no longer setting the way Microsoft are. Apple are simply copying Microsoft trying to keep up, they will never be on top again.

        • Avatar

          Paul Thurrott

          Apple has 50 percent marketshare in the U.S.
          • Avatar

            curtisspendlove

            In reply to paul-thurrott:

            Yup!


            And, despite their seemingly best efforts to shaft every single developer using Apple’s platform, it has *by far* the best and most dedicated Apps and developers.


            This is great news for Windows. More and more Apple dev shops are looking to port their excellent apps and services to non-Apple platforms if the amount of work is negligible.


            It isn’t usually cost effective to maintain a full port. But partial ports are much more potentially lucrative.

            • Avatar

              garrygbain

              In reply to curtisspendlove:

              Even if Apple had 100% market share in the U.S. you have to look at the bigger picture, which is world wide, also, Apple developers are not all in the U.S. they're WW. Apple not only shaft their developers they're also shafting their end users. The only reason Apple have "dedicated developers" is because they can over charge for their apps on an over priced phone (no one lives in a caravan with a Ferrari parked outside). They're not the most profitable company in the world due to selling the most devices (far from it), it's because they over charge. The only thing Apple are good at is over charging and marketing, nothing more.


  11. Avatar

    tonchek

    C# on iOS, OSX: Yes!

    Swift on WIndows: NOOOOO!!!!!

  12. Avatar

    reformedctrlz

    Spark is actually my go-to email app across iPad and Android and I was excited they were bringing it to Windows, but hadn’t know it was using Swift on Windows to do so! This will definitely be an exciting reason for me to try it out and see how well it works. And switch to a better email client at the same time #win10mailapp

  13. Avatar

    lezmaka

    As someone that uses C# for Windows stuff, there were some parts of Swift that I really liked. It's been years since I've messed with Swift so I've forgotten most of it, but the thing I wish would come to C# is the flexibility of enums and being able to associate data with an enum.

  14. Avatar

    waethorn

    Why is it that all modern programming languages tend to only differ in syntax rather than concept? To a layman, code looks the same with declarations and multitudes of brackets and indents. There doesn't seem to be any innovation in programming concepts even though many (probably most) new languages are coming out as being high-level.

  15. Avatar

    davehelps

    @Paul: Programming Windows: SwiftPad?

  16. Avatar

    ZeroPageX

    For anyone interested in downloading this, be aware it requires certain Visual Studio 2019 components be installed first as well as CMake, but it does not take advantage of the IDE.


    Also, the REPL environment is straight up broken in this release. The package manager is also not there, so the "swift build" stuff they have on their "Getting Started" page doesn't work. You need to search around to find information on how to get code to build.

Leave a Reply