3 ms·
I'm always happy when a new GUI toolkit comes out and Slint looks really well done, especially if you like QML. I could imagine using it if I do another embedde
by captainmuon 3y ago
I'm always happy when a new GUI toolkit comes out and Slint looks really well done, especially if you like QML. I could imagine using it if I do another embedded or kiosk application.
However, I find the modern flavor of "declarative" is not really for me. QML, Slint, and to some degree XAML and SwiftUI are all like this. They mix widgets with layout elements and presentational elements (like rectangles). There is no separation of content and style. Another smaller problem is that the initial layout is done in the markup language, but any runtime additions have to be done in another language (if at all possible).
In my ideal GUI, you could say in code "give me a detail-item view" or "this pane shows the detail of the selected item from this pane", and then have it layed out according to platform standards, possibly completely different on iOS or on Windows. But then you could go in and customize the placement and look&feel of every element with CSS if needed. Either applying platform styles ("default inset border") or completely custom styles.
- pie_flavor 3y agoSeparating content and style does not really have a purpose in GUIs. A lot of people who come from HTML assume it does because HTML does it, but HTML does it because it's for documents, where it does have a purpose. It's got nothing to do with declarativeness; everyone does the same thing because it works and the other way doesn't solve problems. The only non-DOM-based library I know of to use separate stylesheets is JavaFX and it's one of the biggest reasons people hate it.