Could you elaborate more on this? What are those overlapping rules?
> unnecessary complexity just to get a layout heirarchy and dependencies.
I have no idea why you think it is so complex...
DOM element is this:
class Element {
weak_ptr<Element> parent;
vector<ptr<Element>> children;
map<...> attributes;
}
And you will see EXACTLY the same structure in any GUI framework/system.> And you will see EXACTLY the same structure in any GUI framework/system.
I'm sure it works fine, but I wouldn't get stuck on thinking there is no other way.
"I wouldn't get stuck on thinking there is no other way"
There is a way, named "Dear ImGUI", that does not use DOM structure but rather recreates its on each paint event.
> There is a way, named "Dear ImGUI"
I'm not talking about immediate GUIs (and they use a heirarchy for layout too of course). You put some example c++ and said every GUI has that same structure, which isn't necessarily true. A heirarchy doesn't have to be implemented with a tree of pointers.
I'm not saying these things can't work, but saying 'this is how it must be done' is just not true.
I'd insist on EVERY here. Container holds list of children. Child holds reference to parent - typical tree implementation.
If you have in mind something else - please show.
Once again: IAccessibility mandates tree organization of your UI. You can do whatever you want but your UI framework MUST expose UI structure as a tree.
> ANY UI application uses DOM tree in either form. And so ANY application uses some sort of markup language.
You are conflating DOM and markup language with heirarchy/dependencies. It isn't necessary to have a text language with lots of different overlapping rules and syntax.
> And HTML parsing is not significantly slower
It's not about speed, it's about unnecessary complexity just to get a layout heirarchy and dependencies.
> UI where components are nailed down to pixel grids and colors
That's a false dichotomy. UIs have been laying out their components without parsing text for almost half a century.