The Command Sigil
Encapsulating a request as an object to parameterize clients.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Command
ARCANUM SCHOOL: Enchantment // Deferred Invocation
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
module CommandPattern where
open import Data.String
record Command : Set where
field execute : String
invoker : Command → String
invoker c = Command.execute c
The Command Sigil
A spell cast need not unleash its energy immediately. By carving the spell into a Command Sigil, it can be queued, undone, or passed across the network to detonate elsewhere.
The Dependent Runes
The record Command wraps an effect (or a pure evaluation returning a State transition). It decouples the one who decides to execute it from the one who knows how to execute it.
Runic Tags:
#agda
#command
#behavioral