The Flyweight
Use sharing to support large numbers of fine-grained punch card data records efficiently.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Flyweight
ARCANUM SCHOOL: Conjuration // Efficiency
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PLI PATTERN //
/* The Flyweight */
FLYWEIGHT: PROC OPTIONS(MAIN);
DCL 1 SHARED_DATA BASED(S_PTR),
2 INTRINSIC_STATE CHAR(10);
DCL FLYWEIGHT_POOL(100) POINTER;
PUT SKIP LIST('Sharing intrinsic mainframe states...');
END FLYWEIGHT;
The Flyweight optimizes storage on older IBM systems by caching pointers to shared intrinsic state arrays instead of duplicating records.
Runic Tags:
#flyweight
#sharing
#efficiency