I think your post is a nice summary of the thinking that got us here in the first place: experts always looking at the possible future optimizations and not stopping to think at the present quality or if it's at all reasonable to build complex UIs in a document mark-up language.
Kind of strange to write bindings to something you hate so much. Or was it a changed of mind in the last 11 months?
With that said, I do agree with you, but there's not a single solution out there that does this efficiently, a browser is a ginormous level of indirection after all.
But if you want to spearhead such a thing I'm sure as hell interested.
This whole section has a very polarized/aggro vibe that's putting me on guard against false dichotomies and dogmatic arguing :| I need a chill pill myself.
It's a fair point, however. :) Much of my interest in libui was (a) to provide platform support for the browser engine; (b) to provide a solution for simple projects that don't want large dependencies. I've always believed the native UI frameworks from the '90s to be poor fits for modern graphics hardware. But sometimes your workload is so simple you don't care about whether your UI is as fast as possible, and minimizing dependencies is a more important criterion. That's where simple native UI layers can be a good fit.
Is there anything out there taking a better approach that works for native desktop? React Native and Flutter look like interesting solutions, but RN attempts to do all the hard work with JS, which is far from ideal; and Flutter is limited to Dart (which not that much better) and isn't getting any traction on desktop outside of the experimental Fuchsia.
Since you are clearly an expert here, can you explain to me how an immediate-mode API from the 1980s in which all painting is done via the painter's algorithm and context switches to kernel mode on every operation is superior to a declarative model that allows for global optimizations to minimize state changes and batch draw, in addition to using hardware Z-buffers to minimize overdraw?