✨ ARCANUM RUNE DIFFICULTY: Adept Creational

The Abstract Factory

Conjure families of related content-addressed constructs without specifying their concrete structures.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Abstract Factory
ARCANUM SCHOOL: Conjuration // Matter Creation
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
structural type Golem = Clay | Iron | Flesh
structural type Wand = Oak | Willow | Bone

structural type ArtificerFactory = {
  createGolem : () -> Golem,
  createWand : () -> Wand
}

necromancerFactory : ArtificerFactory
necromancerFactory = ArtificerFactory ( _ -> Flesh ) ( _ -> Bone )

geomancerFactory : ArtificerFactory
geomancerFactory = ArtificerFactory ( _ -> Clay ) ( _ -> Oak )

-- The content-addressed hash of the factory guarantees pure, consistent generation.

In the Unison arcane weave, spells are addressed by their true hash, not their mortal names. The Abstract Factory ensures that when you conjure a suite of tools, they are strictly bound by the same hash lineage. By passing a factory record, the adept delegates the exact nature of the materialization to the higher arcane context.

Runic Tags: #creational #factory #unison #content-addressed