🧱 B PRECURSOR DIFFICULTY: Apprentice Creational

The Singleton

The one true global word, eternal and unchanging across the execution plane.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Singleton
ARCANUM SCHOOL: Abjuration // Sealing
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// B PATTERN //
/* The eternal 'ext' keyword anchors our memory in the world state */

ext monolith;

get_monolith() {
    if (monolith == 0) {
        /* Awakening the monolith for the first and only time */
        monolith = 'AWAK';
    }
    return monolith;
}

commune() {
    auto a, b;
    a = get_monolith();
    b = get_monolith();
    /* a and b point to the exact same primordial truth */
}
Runic Tags: #b #design-pattern #precursor #bell-labs-magic #untyped