Swift Finally Comes to Windows

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.”

Windows Intelligence In Your Inbox

Sign up for our new free newsletter to get three time-saving tips each Friday — and get free copies of Paul Thurrott's Windows 11 and Windows 10 Field Guides (normally $9.99) as a special welcome gift!

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

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

Share post

Please check our Community Guidelines before commenting

Conversation 35 comments

  • will

    Premium Member
    23 September, 2020 - 9:23 am

    <p>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. </p>

  • codymesh

    23 September, 2020 - 9:32 am

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

    • illuminated

      23 September, 2020 - 3:06 pm

      <blockquote><em><a href="#578153">In reply to codymesh:</a></em></blockquote><p>You just do not know :)</p>

  • matsan

    23 September, 2020 - 9:45 am

    <p>Wooo-hoo – yet another way to write Windows software… in Win32.</p>

    • MutualCore

      23 September, 2020 - 10:33 am

      <blockquote><em><a href="#578156">In reply to matsan:</a></em></blockquote><p>Win32 is deprecated API. Any new Modern Windows app is not using it anymore.</p>

      • matsan

        23 September, 2020 - 11:51 am

        <blockquote><em><a href="#578168">In reply to MutualCore:</a></em></blockquote><p>The calculator example mentioned uses swift-win32 which according to the project page on github:</p><p><br></p><p>"provides Swift friendly wrapping of the Win32 APIs"</p>

        • Paul Thurrott

          Premium Member
          24 September, 2020 - 9:21 am

          Interesting. So like MFC but not horrible. This is an interesting idea.

        • curtisspendlove

          24 September, 2020 - 11:21 am

          <blockquote><em><a href="#578190">In reply to matsan:</a></em></blockquote><p><em>"provides Swift friendly wrapping of the Win32 APIs"</em></p><p><br></p><p>Clever. And makes sense since Swift basically wraps up most of the Objective-C APIs on Apple’s platforms too. To provide backward-compatibility. </p>

          • matsan

            24 September, 2020 - 11:33 am

            <blockquote><em><a href="#578587">In reply to curtisspendlove:</a></em></blockquote><p>But sad that of all the 5+ different UI frameworks Microsoft has released the last ten years, for this, they choose … Win32</p>

    • codymesh

      23 September, 2020 - 12:08 pm

      <blockquote><em><a href="#578156">In reply to matsan:</a></em></blockquote><p>yeah but you see, it's Apple doing it and not Microsoft, so it's cool!</p>

  • tonchek

    23 September, 2020 - 9:58 am

    <p>C# on iOS, OSX: Yes!</p><p>Swift on WIndows: NOOOOO!!!!!</p>

  • reformedctrlz

    Premium Member
    23 September, 2020 - 10:00 am

    <p>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</p>

  • lezmaka

    Premium Member
    23 September, 2020 - 10:55 am

    <p>As someone that uses C# for Windows stuff, there were some parts of Swift that I really liked. <span style="color: rgb(0, 0, 0);">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.</span></p>

  • waethorn

    23 September, 2020 - 1:28 pm

    <p>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.</p>

  • davehelps

    Premium Member
    23 September, 2020 - 1:59 pm

    <p>@Paul: Programming Windows: SwiftPad?</p>

    • Paul Thurrott

      Premium Member
      24 September, 2020 - 9:18 am

      Unlikely. 🙂

  • ebraiter

    23 September, 2020 - 2:45 pm

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

    • ontariopundit

      23 September, 2020 - 6:26 pm

      <blockquote><em><a href="#578264">In reply to ebraiter:</a></em></blockquote><p>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!</p><p><br></p><p>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.</p>

      • garrygbain

        24 September, 2020 - 1:39 am

        <blockquote><em><a href="#578313">In reply to OntarioPundit:</a></em></blockquote><p>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.</p>

        • Paul Thurrott

          Premium Member
          24 September, 2020 - 8:50 am

          Apple has 50 percent marketshare in the U.S.

          • curtisspendlove

            24 September, 2020 - 11:18 am

            <blockquote><em><a href="#578501">In reply to paul-thurrott:</a></em></blockquote><p>Yup!</p><p><br></p><p>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. </p><p><br></p><p>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. </p><p><br></p><p>It isn’t usually cost effective to maintain a full port. But partial ports are much more potentially lucrative. </p>

            • garrygbain

              25 September, 2020 - 6:47 pm

              <blockquote><em><a href="#578585">In reply to curtisspendlove:</a></em></blockquote><p>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. </p><p><br></p>

    • wright_is

      Premium Member
      24 September, 2020 - 6:13 am

      <blockquote><em><a href="#578264">In reply to ebraiter:</a></em></blockquote><p>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.</p>

  • illuminated

    23 September, 2020 - 3:13 pm

    <p>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.</p>

    • nordyj

      23 September, 2020 - 6:28 pm

      <blockquote><em><a href="#578271">In reply to illuminated:</a></em></blockquote><p>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.</p>

      • Paul Thurrott

        Premium Member
        24 September, 2020 - 8:57 am

        Yes, the 2021 version, Project Maui, will support desktop.

  • Jim Lewis

    23 September, 2020 - 4:35 pm

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

  • erichk

    Premium Member
    23 September, 2020 - 5:46 pm

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

    • wright_is

      Premium Member
      24 September, 2020 - 6:11 am

      <blockquote><em><a href="#578307">In reply to ErichK:</a></em></blockquote><p>It is a more modern language and easier to use than the variant of C++, Objective C, that Apple was using. It also does automatic heap space clean-up etc. and is type safe AFAIK, similar to C# on Windows. It is supposed to be more secure than Objective C as well as easier to grasp.</p>

      • Paul Thurrott

        Premium Member
        24 September, 2020 - 8:49 am

        Being better than Objective C is about the lowest bar there is.

  • harrymyhre

    Premium Member
    23 September, 2020 - 10:53 pm

    <p><span></span>?Corpus? </p>

  • ekim

    Premium Member
    24 September, 2020 - 3:55 am

    <p>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?</p>

  • arthemis

    24 September, 2020 - 9:42 pm

    <p>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?</p>

  • spiderman2

    25 September, 2020 - 12:59 am

    <p>finally … for all 12 people that asked for it</p><p><br></p><p>UWP (is dead) support is coming too</p>

  • ZeroPageX

    28 September, 2020 - 10:31 pm

    <p>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.</p><p><br></p><p>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.</p>

Windows Intelligence In Your Inbox

Sign up for our new free newsletter to get three time-saving tips each Friday

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

Thurrott © 2024 Thurrott LLC