News for hackers. Stuff that matters.
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?