Comment by moron4hire

3 days ago

This is a classic problem I identify across a wide variety of types of software. I call it "forcing a graph into a tree" and it comes up any time you have something that must be evaluated across multiple axises but the earliest assumptions (now invalidated) about the data restricted it to a tree, or the most really available tools to process it is with tree-like data structures and algorithms.

HTML is a tree. It's really great at trees. But defining a grid layout sometimes requires organizing data by both the rows and the columns. That can't fit into a tree.

I think a lot of people's complaints that "CSS is too complex, why can't we just do this in HTML" would go away if they could understand that CSS--being a rules-based system--can process the graph, but HTML can only ever define a tree. There are things that will just never work in just HTML.

This gets hard because trees are easy for people to understand. We have lots of examples of them: file systems (if you ignore symlinks). Family trees (if you ignore inbreeding). Tree of life taxonomies (if you ignore more than basic undergrad biology). You can probably guess by my caveats how much I feel it is important to study graphs. But graphs are "scary Computer Science" stuff to a lot of people, so they don't take the time to learn.