Towards Principled Reactive UI
In practice, an immediate mode API is clearly the way to go.<p>We've all seen "smarter" approaches failing more than a few times, obviously on the simplicity side but also, sadly, on the performance side, even with all the caching and retained structures.<p>This is the strange beauty of brute force algorithms, they may look dumb and ugly for our refined human minds, but they tend to map very well to the capacities of computers.<p>It is often faster to not bother and blindly render something instead of running complex logic to decide if you really need to render or not.<p>And if you're not satisfied with the performances of a "dumb" imgui, you can always add some smarter caching without touching the API.<p>Altough I bet this approach would only get you marginal benefits.