News for hackers. Stuff that matters.
Re:Towards Principled Reactive UI by boulos on Saturday September 26, 2020 @01:37PM (#24600612)
Hmm.

I’m a big fan of immediate mode myself, because it’s kind of amazing how much you can actually push through via brute force.

However, wouldn’t you agree that Unity, Open Scene Graph, etc. are successful counter arguments?

I would say it depends on your audience. The bottom layer of the stack might be a very simple retained mode, or fully brute force immediate, but it’s not clear to me that a “UI framework” for application developers should be immediate mode.

Re:Towards Principled Reactive UI by stephc_int13 on Saturday September 26, 2020 @01:51PM (#24600716)
In my opinion, the reason why immediate-mode API are so efficient and practical is because it helps to avoid structure duplication.

An UI, from an abstract point of view, is nothing but a big structure.

When you're writing an application or a game, you very often already have an existing structure containing everything you need.

Take a simple example : a leaderboard.

Using anything but an immediate-mode API will force you to create a second, complex structure to hold this leaderboard, and a lot of glue code to copy data to and from this structure.

Re:Towards Principled Reactive UI by boulos on Saturday September 26, 2020 @02:12PM (#24600867)
Interesting.

I think that argument is “people can’t usefully agree on common abstractions, why bother forcing a translation”. And so for users of scene graphs, it’s basically “well, we can all agree there’s a basic graph and bounding boxes are a thing” so you’re not giving up much.

But for UI, is the argument that it’s often more like drawing/painting, so you spend more cycles (in both mental and processing senses) on trying to express the thing you already knew you wanted to achieve?

Re:Towards Principled Reactive UI by learc83 on Saturday September 26, 2020 @02:01PM (#24600788)
I don’t know. Unity is completely redoing their UI stack, so I don’t think even they are happy with the current incarnation.
Re:Towards Principled Reactive UI by boulos on Saturday September 26, 2020 @02:16PM (#24600902)
I meant Unity in the “you’re my game engine / scene graph” sense. Like why are game engines and scene graphs fairly successful, yet the comment I replied to is arguing “clearly retained mode doesn’t work”.
Re:Towards Principled Reactive UI by learc83 on Saturday September 26, 2020 @02:35PM (#24601052)
The hierarchy in a game object scene graph tends to be much shallower than a UI hierarchy, so I’m not sure if that is a good comparison.
Re:Towards Principled Reactive UI by stephc_int13 on Saturday September 26, 2020 @02:15PM (#24600896)
It is absurdly easy to make a sluggish and extremely memory inefficient UI with the old Unity API.

I've seen that made many times.