Live data from Hacker News

Swift on Windows

swift.org

21–30 of 209 posts

Re: Swift on Windows

#21
post #6

Swift for Android would be a real milestone. There are not so many mainstream cross mobile development platforms.

Swift alone would be nice, but implementations of UIKit and/or SwiftUI for Android would be even better. SwiftUI in particular makes a lot of sense as a cross-platform UI framework, since its appearance and behavior adapts to the platform it's running on instead of trying to shoehorn in a single look and feel everywhere.

If thats what you are after then flutter is available today

Re: Swift on Windows

#22
I really like Swift. Recently I've been using it as my "main" language in developing a macOS user interface for my MSc research project, and it has literally made developing fun!

Great to see it getting more support outside of the Apple domain.

Re: Swift on Windows

#23
post #20

I haven't done Windows development in over 10 years, but I really wasn't expecting to see what appears to be a stripped down implementation of AppKit wrapped around the old Win32 APIs, like it's 1999. (Nor Hungarian Notation). I thought WPF or WinRT or UWP was supposed to have replaced Win32 by now.

I don't do any desktop development or use Windows much for that matter, but it looks like as of today, there are at least 4 ways [0] to build Windows desktop apps. No wonder the UX feels far less consistent and enjoyable than macOS. [0] - https://docs.microsoft.com/en-us/windows/apps/desktop/

I suppose if Swift can only interoperate with C APIs, Win32 would be the only option.

Re: Swift on Windows

#24
post #8

> For the ones interested in working on core tooling, there is plenty of work to be done to improve the debugger and to improve the Windows support in the Swift Package Manager. We invite you to check out the Swift Bug Tracker for the current issues and to send patches to the GitHub repositories. Poor Apple, budget cuts have been hit really hard.

this is actually a community project, the guy behind all this (Saleem) isnt even at Apple, hes at Google.

Is it just a hobby project, or actually sponsored by Google?

They are trying to push Swift for Tensorflow [1], so proper upstream cross-platform capability would probably be important to them.

[1] https://www.tensorflow.org/swift

Re: Swift on Windows

#25
post #8

> For the ones interested in working on core tooling, there is plenty of work to be done to improve the debugger and to improve the Windows support in the Swift Package Manager. We invite you to check out the Swift Bug Tracker for the current issues and to send patches to the GitHub repositories. Poor Apple, budget cuts have been hit really hard.

this is actually a community project, the guy behind all this (Saleem) isnt even at Apple, hes at Google.

Yeah, Google is also another one struggling with hard times.

Now contrast this with Java or .NET where the large majority of the development comes from the corporations themselves.

Re: Swift on Windows

#26
To abuse an old meme: "...yes, but does it run on Linux..."

It seems like Windows already has a glut of similar tools; if you wanted to make a real impact with a fairly new language, which Swift is, with massive corporate backing, which Swift has, the one would think Linux would be a far more opportune destination for an effort like this.

Re: Swift on Windows

#27

Earlier quoted context omitted.

Kotlin Native React Native

Ehh, kotlin MPP isn't far enough along for me yet. I'm biased against JS-based approaches. Xamarin is the best current option in my (very biased) opinion EDIT: but kotlin MPP is my long term hope. Once they iron out the kinks (e.g. ios coroutines)

I was skeptical of React native especially having tried it a few years ago, but new versions are incredibly nice.

Plus, it’s running JS off thread. Performance has been fantastic. I rewrote recently an app in SwiftUI - the React Native app was faster and easier to write. Which was a surprise to me because I like the SwiftUI components more, but in the end the far superior hot reloading and far better dev tools, along with the much better flexibility (less time “getting the code/types to run”) meant I was moving about 5-10x faster.

Finally, we are sharing almost 100% of code across native and web. We built a component kit designed to use react-native-web and that handles just a few edge cases, and the net result is quite awesome. We do obviously have it designed to look different when mobile, but it’s the exact same as the web responsive mobile. The web version adapts nicely based on screen size as well.

So unlike Flutter you’re not having to deliver a massive web bundle with tons of incompatibilities and perf issues. And unlike any other language you’re fully cross platform.

I ran it for the first time the other day on Android just to test if it worked and it did first try, no code change necessary. I’ve definitely changed my opinion - React is not just viable, but preferred to me, even if I could theoretically move as fast with a native app in each language.

Re: Swift on Windows

#28
post #26

To abuse an old meme: "...yes, but does it run on Linux..." It seems like Windows already has a glut of similar tools; if you wanted to make a real impact with a fairly new language, which Swift is, with massive corporate backing, which Swift has, the one would think Linux would be a far more opportune destination for an effort like this.

There are already multiple Linux toolchains available, Windows is just catching up: https://swift.org/download/

Re: Swift on Windows

#29
post #26

To abuse an old meme: "...yes, but does it run on Linux..." It seems like Windows already has a glut of similar tools; if you wanted to make a real impact with a fairly new language, which Swift is, with massive corporate backing, which Swift has, the one would think Linux would be a far more opportune destination for an effort like this.

It already works on Linux (quite well, actually): https://swift.org/download/#releases

Re: Swift on Windows

#30
post #26

To abuse an old meme: "...yes, but does it run on Linux..." It seems like Windows already has a glut of similar tools; if you wanted to make a real impact with a fairly new language, which Swift is, with massive corporate backing, which Swift has, the one would think Linux would be a far more opportune destination for an effort like this.

It has run on windows for years. It's fairly limited in terms of distro support, but this is a stated goal for Swift 6.
Post reply on HN