Hacker News new | ask | show | jobs
by rubymamis 544 days ago
While I welcome new cross-platform GUI Frameworks, I wonder why not use a declarative UI similar to QML? Even Slint[1] (which is built in Rust) uses such syntax for its UI.

[1] https://slint.dev

2 comments

It isn't really that important to have a declarative UI, making the UI is rarely the time consuming or difficult part of making a program. An extra markup language for a UI adds bloat and ambiguity. Now you're learning a different ad hoc language and trying to get around its quirks just to be able to feed in data that could have been done directly with functions.
Gosh I feel like making the UI is always time consuming, but that might just be because I find it repetitive and boring, and thus perceive the work as taking longer.

I could die a happy man never imperatively constructing nested QBoxLayouts again.

Is that because it's actually difficult or because iterations take a long time from obnoxious compilation times?
Eh Qt isn’t really difficult, just not my idea of fun. I use the python bindings so compilation time isn’t a thing.
Eh gosh if you're using PyQt already, why would a different markup language to create the GUI help? Are you even using QML? That is the context of this thread.
I was only responding to the general statement that making the UI is not the time consuming part of app development.
I second that. I used Dash for a while. Although it's nice to have everything wired up for free, the code quickly becomes a mess as soon as you try some more complex things (or you put everything in one function and got a big super nested structure, or you build a lot of small components and quickly get lost in a sea of small functions).

I'd rather build the HTML myself.

[1]: https://dash.plotly.com/