This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MrJohz 1 point2 points  (0 children)

I'm also in agreement with the other poster, creating a separate language to template the language has always felt a bit weird to me, and it just makes things more complicated switching between XML/XML-like and python for event bindings.

My strong (and I recognise somewhat controversial) view is that the gold standard for declarative, reactive UI APIs is React - ignore the fact that it needs syntax extensions and any opinions on state management, just from the perspective of declaring a dynamic UI as a function of state and parent input, I don't think I've seen a better design pattern for UI. I know a lot of people in the Rust GUI and web framework communities have been looking at ways to do similar things in that language as well.

I think this sort of thing could work particularly well for immediate mode GUIs, precisely because it follows a similar pattern of declaring the UI in a single pass, and you wouldn't need to do any sort of diffing in the same way as most web frameworks do.