Live data from Hacker News

Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

infoq.com

91–100 of 308 posts

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#91

> . It is hard to think that any Windows programmer would prefer Swift as a language over .NET languages, as many commenters pointed out on Reddit, but a port of Swift UI on Windows could be a game changer. Everybody would jump to Swift [for new projects] if it meant a cross-platform GUI framework.

That's a big if. From what I've read, SwiftUI isn't even a great Mac/iOS GUI framework yet. And Windows and Linux are drastically more different than those two.

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#92
post #84

Earlier quoted context omitted.

What would it provide that Qt + QML don't right now? (if we assume that the crossplatform GUI is the killer feature)

I'm sure licensing is a big one. It looks like SwiftUI is MIT license and Qt is dual licensed.

I think you are mixing up Swift and SwiftUI.

Swift is a programming language created by Apple, it's been cross-platform for a while but is now going to be officially supported on Windows. Swift is Apache licensed.

SwiftUI is a UI framework created by Apple for the Swift language, it's only available on Apple platforms, and it's proprietary.

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#93

Earlier quoted context omitted.

What would it provide that Qt + QML don't right now? (if we assume that the crossplatform GUI is the killer feature)

A modern, powerful memory safe language? C++ is hardly a good choice for making casual small GUI apps.

except for the documentation the python (pyside2) bindings seem pretty complete.

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#94

Earlier quoted context omitted.

What would it provide that Qt + QML don't right now? (if we assume that the crossplatform GUI is the killer feature)

A modern, powerful memory safe language? C++ is hardly a good choice for making casual small GUI apps.

Qml supports ES7 so you only really need to touch C++ if you're not making "casual small GUI apps". If you need to draw custom items or do low level networking then yeah you need to use C++ but even then Qt is much friendlier than using the standard libraries.

Here is a Qt C++ example:

    QString str = "/a/b/c/";
    auto parts = str.split('/');

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#95
post #75

Earlier quoted context omitted.

Creating a good cross-platform GUI framework is probably harder than creating a good cross-platform language.

Possibly, but that's if you include the part about making it look/feel native. If you just provide the tools the are just focused on the language and framework and let the people who care about making it look native on whichever platform it's running focus on that then I think it's doable. Unlike things like react native you wouldn't be actually using the native components necessarily unless you can implement the UI…

A native look and feel is definitely an implicit assumption I held. You’re right that eliminating this requirement changes the level of difficulty significantly.

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#96
post #54

Earlier quoted context omitted.

> SDL only does so much, and you still need platform-specific APIs for file access, networking (if applicable), threading, etc. So you'll still need platform-specific code until someone writes those abstractions in Swift. Isn't that handled by the swift runtime? By without any changes I meant, without platform-specific recompilation. Very similar to what java runtime provides for JAR.

You'll always need platform-specific recompilation for native executables, as the executable formats are different on different operating systems. The only exceptions are emulation systems like WSL and Wine.

I should have added it to my first post - SDL provides precompiles libraries for different platforms. All I have to do is to distribute them with my game. Does it solve the problem?

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#97
post #40

> It is not clear at the moment if Apple has any plans to port Swift UI to Windows and/or Linux It seems pretty clear they have 0 plans on doing that. They could've open sourced it in the first place, along with Combine. Not open sourcing Combine seems like a pretty short sighted decision to me.

hard to open source it when its implementation is tied to the XNU kernel

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#98

Quick question: Does it mean now we can write games on Windows using SDL + Swift, and it will run on MacOS without any change at all?

There's libraries which wrap SDL for Swift and run on Mac, iOS and Linux. Someone should help them to get support for Windows.

This project has a good list of SDL Swift libraries at the end of the page: https://github.com/ctreffs/SwiftSDL2 - but I don't know which one is the best one..

Then, we need to get Swift to compile for Android..

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#99

> . It is hard to think that any Windows programmer would prefer Swift as a language over .NET languages, as many commenters pointed out on Reddit, but a port of Swift UI on Windows could be a game changer. Everybody would jump to Swift [for new projects] if it meant a cross-platform GUI framework.

What would it provide that Qt + QML don't right now? (if we assume that the crossplatform GUI is the killer feature)

Every time mobile cross-platform is discussed, someone brings up Qt when it's less popular for mobile development than React Native, Flutter, Xamarin, or PhoneGap/Codova. Maybe even less than Ionic, NativeScript, or Appcelerator. Why even bother with such a niche solution? Are there even live cases of mobile apps using Qt?

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#100
Very interesting - so basically it will be versus React Native on Windows & Mac (using Typescript) https://microsoft.github.io/react-native-windows/

Arguably people are already used to creating desktop apps using JS/Typescript using the Electron framework. React Native builds upon that.

2021 is going to be interesting

Post reply on HN