At this rate programming languages will reinvent GUI builders from Delphi/Lazarus in 2050
I still find it quite sad that the pinnacle of GUI programming tools was reached over 20 years ago, when Delphi 6 was released, and we've been going more or less downhill ever since.
GUI development with Rust and GTK 4
61–70 of 172 posts
Re: GUI development with Rust and GTK 4
#62Earlier quoted context omitted.
The apostrophe isn’t superfluous. ‘Static in this context refers to static lifetime. Lifetimes have absolutely 0 impact on runtime.
I'm not sure what this has to do with the parent post or how it contradicts what I said. https://doc.rust-lang.org/std/keyword.static.html
Re: GUI development with Rust and GTK 4
#63What about making it easy to import Rust business logic into C# / Swift / whatever GUI language you're using? I get the value of 100% (or 50% or 80%) implementing the UI in Rust; especially for tools that won't benefit from a native UI, or tools that only need light integration into platform-specific UI features. I've also shipped a desktop product that had a 100% native UI and a cross-platform codebase. Today, imple…
Re: GUI development with Rust and GTK 4
#64Rust GTK4 "hello world" app, as a downloadable project, demonstrating the builder pattern: https://github.com/SixArm/rust-guideposts/blob/main/projects...
Honestly this looks like programming style from 90s. Why not design UIs in an editor that saves layout to XML?
This is part of why for apple platform dev, several years ago I abandoned XML-based XIB and storyboard UI design for any collaborative project. Writing it all out in code (even with just UIKit, no SwiftUI) is a lot more pain-free.
I’d like to do the same for Android projects, but Google is hellbent on the XML usage if you’re building with Android Framework… Jetpack Compose improves the situation some but I’ve not used it much yet.
Re: GUI development with Rust and GTK 4
#65Earlier quoted context omitted.
How would you get a static lifetime without a static object?
Unrelated to the above convo, but: An owned object can be bound by a static lifetime, for example. Eg, `fn foo (t: T){}\n foo(String::new());`
Re: GUI development with Rust and GTK 4
#66Earlier quoted context omitted.
While you can create one on your own, any lib that doesn't have a tree widget isn't ready for primetime IMO. Obviously others may have a different opinion. Also, I don't believe there is any way to embed a webview at this point which is often necessary to embed things like charts or other widgets you don't want to create on your own.
Also, tableview/datagrid, complete with support for sorting and reordering items and columns. It’s shockingly difficult to find newer UI frameworks with this, even though it’s one of the most important desktop UI widgets for a lot of use cases. Win32, Cocoa, GTK, and Qt Widgets have it though, and that’s part of why those toolkits continue to get used.
Re: GUI development with Rust and GTK 4
#67Earlier quoted context omitted.
Native look and feel is vastly overrated imo. Delphi and before it borland builder made for great UIs despite not looking native. To the point that when I came across that widget set, I knew I was in for a good UX. Still many bespoke interfaces, like at a brakes repair or small lumber yard chain use delphi and it works just fine. As for the webview, thats a thing, but if you will have web access, you can target wasm,…
> Edit: dropping the demo link here for people to poke around. I'm curious what people use that is missing, and what people find unsuited to commercial use. As I alluded in my other comment, theming is possible but it's really limited if you expect anything close to what you'd typically expect. You can put borders and colors on frames, but it's pretty limited. For example, if you want to have a border with different…
I rarely create guis, mostly just cli tools. Is there a good intro to basic ui theory so I bdont upset people with higher expectations in the rare event I do create one?
Re: GUI development with Rust and GTK 4
#68Re: GUI development with Rust and GTK 4
#69Rust GTK4 "hello world" app, as a downloadable project, demonstrating the builder pattern: https://github.com/SixArm/rust-guideposts/blob/main/projects...
Honestly this looks like programming style from 90s. Why not design UIs in an editor that saves layout to XML?
Re: GUI development with Rust and GTK 4
#70What are the disadvantages of using 'static here? I wonder if a garbage collected language would have a more accurate life time for that object
What lifetimes do let you accomplish is more fearless ownership tracking and letting the compiler expire references for you without needing to use any kind of reference counting. And all things being equal, precise garbage tracking results in lower peak and average memory usage.