7 ms·
I hope QML/js crap will be abandoned, and C++ API will be prioritized.
by zerr 7y ago
I hope QML/js crap will be abandoned, and C++ API will be prioritized.
- codetrotter 7y agoThat’s not going to happen. Did you read the blog post?
- pjmlp 7y agoFor better or worse, pure C++ APIs have lost the war on GUI frameworks. Microsoft is the only consumer OS vendor that still supports C++ for doing full stack GUI apps, everyone else moved into a mix of C++ plus managed language or layout DSL.
- Const-me 7y ago> Microsoft is the only consumer OS vendor that still supports C++ for doing full stack GUI apps On modern Windows you have C++, and also layout DSL, specifically XAML. And that C++ is not particularly idiomatic, it’s IUnknown-derived interfaces. If you mean windows desktop, WinAPI uses quite a few DSLs. Dialog and menu resources are the most obvious, but there’s more: WMF/EMF vector graphics format, ribbon markup XML for ribbon control, theme files…
- pjmlp 7y agoYou are talking about Win32 legacy API, stuck in Windows XP feature level. Modern Windows desktop UI, UWP aka WinUI, uses C++17 with a framework called C++/WinRT, that hides those IInspectable COM interfaces. Yes there used to exit C++/CX and Windows Runtime Library, both now considered legacy and replaced by C++/WinRT.
- Longhanks 7y agoWho is „everyone else“? GTK‘s primary API is C, Apple‘s is Objective C or Swift, none of them are „C++ plus managed language“, only SwiftUI is „layout DSL“ and it isn’t even released yet. So for targeting X11/Wayland or Windows, you can bet 100% on C++, only Apple platforms do not offer native C++.
- pjmlp 7y agoMetal is written in C++. Try to display graphics in Objective C or Swift without Metal, going further. Which UNIX OS SDK uses a C++ GUI full stack? One could argue for Kubuntu or SuSE, maybe, except KDE isn't tied to a specific OS and then again it uses Qt alongside QML since Plasma, so no pure C++ stack here. And since you missed to fully read my comment, here it is again: > Microsoft is the only consumer OS vendor that still supports C++ for doing full stack GUI apps
- ahartmetz 7y agoThe KDE desktop shell is QML + C++. The vast majority of KDE applications are QWidgets + C++ without QML. I like QML but it's not that great for many / most desktop applications. It works better for creating fully custom touch UIs from scratch. The plan for Qt 6 mentions a styling API which is one of the most important missing pieces, and discussion in the comments maybe indicates more ready to use controls.
- ungzd 7y agoC++ (and even Rust) is not the best language to build UIs. Even if your app heavily uses C/C++ to do heavy computations, "scripting" language will be preferable for "glue code". QML is not a crazy new idea, for example Tk used Tcl. And due to C++ API, Qt has poor language bindings, compared to GTK and many others with C API.
- qekbg 7y ago>C++ (and even Rust) is not the best language to build UIs. Why? And why are scripting languages better?
- ygra 7y agoDeveloper productivity when building or redesigning a UI is often far more important than raw performance. There's usually no noticeable difference for a user whether the dialog they opened via a button click is built in highly optimized C++ or from an XML resource stream that is read, parsed, and the UI constructed on the fly by effectively interpreting the UI description. It's okay to have expensive abstractions where a few milliseconds simply don't matter, but tasks can be done in minutes instead of hours. Declarative UI descriptions also have the benefit of being friendly to visual designer applications, so you need fewer build/run/test cycles (which are far from quick with C++).
- qekbg 7y ago>There's usually no noticeable difference for a user whether the dialog they opened via a button click is built in highly optimized C++ or from an XML resource stream that is read, parsed, and the UI constructed on the fly by effectively interpreting the UI description. I dare you to compare the speed of UIs of Windows XP and Windows 10, even when using the hardware that was current when those OSes were released.
- hedora 7y agoSomeone did a detailed study of UI responsiveness vs year. Responsiveness peaked in the 80’s, in the dumb terminal + regional mainframe era. :-(
- CarVac 7y agoQML is amazing and I hope your hopes are dashed.
- mhd 7y agoAnyone remember Motif's UIL? Plus ca change…