Hacker News new | past | comments | ask | show | jobs | submit login

It remains to be seen weather Swift will break out of being just a language for programming Apple applications.

There is still no way to make gui applications outside of Apple devices. Unless you want to make your own library or generate/maintain Swift bindings for an existing UI library.

Maybe, it will be okay for console only programs or servers but why use that over Java/JVM, nodejs or go?




UI libraries are a poor reason to pick Rust over Swift, given that Rust has a very poor UI story.

Doesn’t your comment apply very equally to Rust? There’s basically Slint and Tauri, and several bindings in various states of disarray. Not exactly very compelling.

The Rust ecosystem has very many strengths, but UI is not one of them.

Regardless, you’re incorrect about there being no way to make GUI applications

Here’s a Gnome binding https://swift.org/blog/adwaita-swift/

The C++ interop allows easy binding to Qt https://github.com/qt/qtdeclarative/tree/dev/tests/manual/he...

Win32 https://github.com/compnerd/swift-win32

The fact that Swift has easier C++ interop than Rust makes the cross platform UI story much easier and more compelling than what I’ve found in Rust.

Bindings are much simpler to manage and can be handled by a single module map file with a single line in it most of the time.

Adding to that, many well established UI libraries depend on classes to implement them. Rusts lack of classes, while wonderful otherwise, makes binding to heavy class based libraries very onerous.

Don’t get me wrong, I really enjoy rust. It’s just, it’s very ill suited for UI work today itself. I almost always write my UI side in C++ if I have to and bind over when needed instead.


My comment wasn't about comparing it to Rust at all. Adwaita for Swift sounds good an all but it still looks immature. Also, the win32 bindings look even more immature. I agree UI is not there yet for Rust and from what I see it's even worse for Swift (unless we're taking about Apple devices).

I'm still not sold on the idea of managing bindings to C++ UI libraries. I'd rather have either the Swift organization or the UI library authors themselves write, maintain and document the bindings. Otherwise, it just seems like fighting against the ecosystem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: