✨ ARCANUM RUNE DIFFICULTY: Apprentice Behavioral

Tactical Sort Strategy

Choose dynamically between different sort utilities (DFSORT vs SYNCSORT).

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Strategy
ARCANUM SCHOOL: Divination // Tactical
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
/* ooRexx Strategy */
::class SortContext
::attribute strategy
::method executeSort
  use arg data
  return self~strategy~sort(data)

::class DFSORTStrategy
::method sort
  use arg data
  say "Sorting via DFSORT."
  return data

::class SYNCSORTStrategy
::method sort
  use arg data
  say "Sorting via SYNCSORT."
  return data

Depending on system resonance and licensing wards, the Strategy pattern seamlessly switches the underlying sort incantation without disrupting the main script.

Runic Tags: #strategy #dfsort #rexx