by kajecounterhack · 3y ago · 0 comments
That said it's probably fine for them to iterate for Mac customers first, like apps releasing on iOS first before supporting Android.
Following this if they were to port to Linux they’d probably write a GTK-based SwiftUI implementation, or if they wait for Swift C++ interop perhaps a Qt-based implementation.
Can you expand on this? I haven't the foggiest idea how this would work in practice.
The SwiftUI API is mostly "just" a DSL built with result builders[0] and should be reproducible without too much trouble. The harder part is reimplementing all of the behavior concerning diffing, rendering, etc, and actually drawing the widgets. Last I knew, their plan is to use community built WinRT/WinUI Swift bindings (perhaps this[1]) as a starting point to marry native Windows widgets to their recreated API. It may be necessary to write some widgets from scratch though, because there are several types that WinUI currently lacks.
It's a gargantuan task they've taken on, but I'm watching intently because despite being the world's most popular platform, the native Windows dev story is currently pretty underwhelming.
[0]: https://www.swiftbysundell.com/articles/deep-dive-into-swift... [1]: https://github.com/ericsink/SwiftWinRT
I find programming user interfaces in SwiftUI to be an absolute joy, and if there were proper bindings to GTK and WinUI then it would be my go-to GUI framework for time immemorial.
The SwiftWinRT project looks interesting -- unfortunately, it seems to be abandoned (last commit was ~1 year ago).
Here's hoping they succeed. If they do, it could totally displace Qt as the standard cross-platform GUI framework (caveat - not for all use cases, of course).