Skip to content

Program Scope & Nesting Disciplines

← Back to Domain-Specific Families

Abstractions about how programs tie work and context to nested scopes and parent-child relations, covering captured environments and point-free definitions (closures, tacit programming), task lifetimes (structured concurrency, fork–join, zombie processes), nested-syntax attachment (dangling else, L-attributed grammars), and misplaced state like the temporary field.

10 abstractions in this family — domain-specific abstractions that sit near one another in structural-signature space (k-means over structural-signature embeddings). Each is shown with its short description.

  • Closure (programming) — The runtime value that packages a function's executable code with the bindings of its free variables captured at construction, so that when applied later its free variables resolve through that captured environment rather than the caller's — preserving lexical scope across the gap between where a function is made and where it runs.
  • Dangling else — Dangling else is the attachment ambiguity created when one optional else follows two nested eligible if statements.
  • Fork–Join Model — A parallel-control model that exposes child work at a fork and requires its completion at a matching join before dependent continuation.
  • L-Attributed Grammar — Constrain inherited attributes to parent context and earlier siblings so parse-tree attributes can be evaluated left to right.
  • Phonological Process — Read a child's scattered speech errors as the output of a small number of rule-governed transformations that apply productively across whole natural classes and drop on a predictable developmental schedule.
  • Structured Concurrency — A concurrency discipline that confines child tasks to lexical scopes with clear lifetime, cancellation, and error-propagation rules so no task outlives its owner unnoticed.
  • Tacit Programming — Defines a function without naming its data arguments, using a primitive or language-defined function-building forms.
  • Temporary Field — The code smell in which an object carries an instance variable meaningful only during one operation or state yet visible as permanent structural state everywhere — a mismatch between the field's structural scope (every instance) and its validity scope (the subset where it holds a real value).
  • Undefined Behavior — A programming-language case for which the governing specification imposes no requirements on implementation behavior.
  • Zombie process — A terminated Unix child process whose process-table record and exit status remain until its parent waits and the kernel reaps it.