🏢 PL/I MONOLITH DIFFICULTY: Adept Structural

The Bridge

Decouple an abstraction from its implementation so that the two can vary independently on the mainframe.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Bridge
ARCANUM SCHOOL: Transmutation // Monolith
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PLI PATTERN //
/* The Bridge */
BRIDGE: PROC OPTIONS(MAIN);
   DCL 1 IMPLEMENTOR BASED(I_PTR),
         2 OP_IMPL ENTRY;
   DCL 1 ABSTRACTION BASED(A_PTR),
         2 IMPL_PTR POINTER,
         2 OPERATION ENTRY;
   PUT SKIP LIST('Bridging abstractions...');
END BRIDGE;

Using pointers to structures that contain function pointers, PL/I can decouple the abstract job logic from the concrete hardware routines.

Runic Tags: #bridge #pointer #implementation