News for hackers. Stuff that matters.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by viraptor on Saturday May 16, 2020 @12:14AM (#23200438)
What would it provide that Qt + QML don't right now? (if we assume that the crossplatform GUI is the killer feature)
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by Apocryphon on Saturday May 16, 2020 @01:07AM (#23200646)
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 Lin... by viraptor on Saturday May 16, 2020 @03:32AM (#23201223)
The article context is Windows and Linux. I'm not sure where "mobile cross-platform is discussed".

But if you want to go to actual cross-platform-beyond-desktop, Qt is still massive on other devices. From cars to TVs to smart fridges.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by eitland on Saturday May 16, 2020 @02:34AM (#23200970)
> Every time mobile cross-platform is discussed, someone brings up Qt

For what it is worth I can't see anyone mentioning mobile and however weird this sounds, for me at least cross platform always implicitly meant across desktop platforms.

Cross platform on mobile never really happened, thanks to Steve Jobs, and I am kind of happy for it so far.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by pjmlp on Saturday May 16, 2020 @02:45AM (#23201032)
Sure it did, in all these years my only native apps have been on personal projects.

In what concerns work, we use a mix of mobile Web, Xamarin, Cordova/PhoneGap, C++ with native views, depending on the customer requirements.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by pfranz on Saturday May 16, 2020 @12:22AM (#23200475)
I'm sure licensing is a big one. It looks like SwiftUI is MIT license and Qt is dual licensed.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by JimDabell on Saturday May 16, 2020 @12:45AM (#23200557)
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 Lin... by pfranz on Saturday May 16, 2020 @02:31AM (#23200954)
Thanks for the correction! I knew of the distinction, but in my haste I was looking at a different repo (and I blanked that the source hasn't been released and licensed).

Swift looks to be Apache licensed. I'm fairly confident SwiftUI wouldn't have a commercial license, which is a major topic with using Qt.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by quantummkv on Saturday May 16, 2020 @12:37AM (#23200524)
A modern, powerful memory safe language? C++ is hardly a good choice for making casual small GUI apps.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by viraptor on Saturday May 16, 2020 @03:34AM (#23201235)
Like Crystal, Go and Rust? (and QML for the basic events handling)

https://en.wikipedia.org/wiki/List_of_language_bindings_for_...

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by foldr on Saturday May 16, 2020 @10:23AM (#23203588)
Have you made any non-trivial use of the Qt bindings for those languages? Qt is a big and complex library, and most bindings are incomplete or poorly documented. As far as I know, PyQt is the only Qt binding is the only one that you can really rely on to work now and in the future.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by SitiSchu on Saturday May 16, 2020 @06:57PM (#23207906)
There is PySide2/Qt for Python which are the official Python bindings for Qt by the Qt Company itself and they are close enough to the C++ API(since they are auto-generated) that it's possible to just use the C++ documentation and translate any C++ code into python nearly 1:1 (except things like QString where you can just use Pythons native types).
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by viraptor on Sunday May 17, 2020 @04:37AM (#23210605)
Not terribly complex, but not trivial either. Yes, there are missing pieces in non-python ones. But given that basics are handled, it's often pretty easy to add the pieces which you need.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by Memosyne on Saturday May 16, 2020 @12:57AM (#23200608)
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 Lin... by pjmlp on Sunday May 17, 2020 @02:57AM (#23210162)
Depends, if you are coding C in C++, or making use of idiomatic C++17 (eventually C++20).
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by Barrin92 on Saturday May 16, 2020 @12:49AM (#23200576)
except for the documentation the python (pyside2) bindings seem pretty complete.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by rapsey on Saturday May 16, 2020 @12:33AM (#23200514)
Pricing and not being c++
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by viraptor on Saturday May 16, 2020 @03:27AM (#23201201)
LGPL is free and there are Qt bindings in pretty much all languages now (+ I mentioned QML for that reason).
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by rapsey on Saturday May 16, 2020 @03:45AM (#23201297)
Bindings are very limited except for maybe python. Using almost any binding you are destined to hit a bunch of roadblocks. Lots of people can’t use lgpl.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by eggsnbacon1 on Saturday May 16, 2020 @03:42AM (#23201278)
Hate to say it, but the sanest thing to do if you need a cross platform UI is use Java. Your other choice is Electron, which is way slower and uses many times as much ram
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by realharo on Saturday May 16, 2020 @04:37AM (#23201584)
I wonder whether GraalVM native image will play a bigger role in desktop apps in the future.

Kotlin + TornadoFX + native-image (if it is supported) sounds like a pretty comfortable to use UI stack.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by vips7L on Sunday May 17, 2020 @11:54PM (#23218150)
Gluon has been putting a lot of work into native-image + JavaFX for cross platform. Im not sure if it'll catch on though.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by manmal on Saturday May 16, 2020 @06:04AM (#23202119)
It’s the sanest thing to do if you can write proper Java, and actually want to do so.