[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Change draft for #149: nested graphs
I pushed a change draft for Issue #149: “Support nested graphs”:
I will move its adoption at TC #18 on May 30th.
This is a new design, replacing the “nested graph traversal” design that we had previously approved, but which was the subject of controversy. IIRC, the discussion was “Let’s take this for now, but we can do better.” This is the “better.”
This proposal comes from Luke. It dispenses with the notion of “nested traversals”, and even with the explicit representation of “nested graphs”. Instead, a node object now has a property children of type node. This is the Composite pattern:
A node is a Component, a node with no children is a Leaf, and a node with children is a Composite. The children are effectively a nested graph.
The change draft also incorporates a contribution from Michael. Since we no longer have a notion of nested traversals, it’s tricky to enable a viewer to provide the “step over/step into” experience. Michael’s solution is to introduce the property edgeTraversal.stepOverEdgeCount. The spec has an example that explains how this works.