3 ms·
I’m a bit torn about this one, because it’s not universally clear that this is the correct way to build these kinds of systems in Rust. GTK has to due to the co
by steveklabnik 8y ago
I’m a bit torn about this one, because it’s not universally clear that this is the correct way to build these kinds of systems in Rust. GTK has to due to the constraints of the system it binds to, but there’s a lot of experimentation of different ways that may be more Rust-y and not have the huge pain points this approach has.
Once its sorted, I think comparing and contrasting this kind of thing would be amazing though.
- amelius 8y agoWhat would be an alternative, equally flexible way to handle callbacks?
- steveklabnik 8y agohttps://raphlinus.github.io/personal/2018/05/08/ecs-ui.html https://raphlinus.github.io/personal/2018/05/08/ecs-ui.html is an entry point into the main alternative that’s being explored, see “druid” as a package that’s an implementation of (an evolution of) these ideas, though it’s still early days. In general, Rust hates big balls of intertwined mutable state. And traditional OOP-y UI frameworks are basically giant balls of intertwined mutable state. You can do it, but it’s not great. We’ll see.
- int_19h 8y agoRealistically, this is still a necessity, because even if Rust comes up with its own quality UI frameworks - which takes years, looking at the history of the ones that we have - some people will still need to integrate with what's already there.
- steveklabnik 8y agoSure, it's still necessary, but that doesn't mean that it needs to be promoted as the correct pattern to use in the general case.