jonnify·bcs /bcs/elixir-core/archetypes/one-parent-no-diamond

B2.4.3 · dive 3 of 3 · module B2.4

One parent, no diamond.

A single :extends link makes inheritance a chain, never a lattice, so the diamond problem cannot arise. The walk is bounded by a depth cap and a cycle guard, so resolution always terminates.

A linear chain, not a diamond; a depth cap and a cycle guard bound the walk. Select a part.
basemidchildone :extends — a chain two parents: a diamondcannot arise hereback into ancestry → :cycle walk: max_depth 8over the cap → :depth
readout · Select a part. One :extends per bundle makes a chain, never a diamond; the walk carries a depth cap (refuses :depth) and a seen-set (refuses :cycle), so it always terminates.
§1

The idea

echo_data · bcs/archetypes.ex

A bundle extends at most one parent. That single :extends link makes inheritance a chain, never a lattice, so the diamond problem — two parents disagreeing about the same property — cannot arise. Where class systems need rules to break ties between multiple bases, an archetype chain has one order and one answer.

The walk that gathers the chain is bounded and guarded. It carries a depth cap, so a chain longer than the limit is refused with :depth rather than run forever; and it carries a set of the ids it has seen, so a bundle that extends back into its own ancestry is refused with :cycle. Resolution always terminates, and it terminates with a reason when the data is malformed.

Codemojex can layer kinds without fear of ambiguity. A special tile extends a power-up that extends a base, three links in a line, and the resolved properties are deterministic; a mistake that pointed a bundle at its own descendant is caught at resolve time, not discovered as a hang. Composition is reuse with a single, ordered, terminating answer.

§4

The doors

the sibling courses
§2

References

sources · related

Sources

Related