The Flyweight Incantation in Simula
Sharing intrinsic state to summon legions without draining the mana pool.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Flyweight
ARCANUM SCHOOL: Transmutation // Efficiency
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// SIMULA PATTERN //
Begin
Class Flyweight;
Begin
Integer sharedEssence;
Procedure Operation(extrinsicState); Integer extrinsicState;
Begin
! Blend shared essence with extrinsic variables;
End;
End;
End;
When the simulation demands thousands of similar entities, memory is a precious resource. The Flyweight shares the intrinsic soul of the objects, passing the transient, extrinsic details only when the spell is cast.
Runic Tags:
#simula
#gof
#structural
#efficiency