Future Or Promise¶
Core Idea¶
A first-class placeholder for a value that does not yet exist but is committed to be supplied later, with a small protocol: a producer holding fulfillment authority, a consumer attaching continuations or waiting, and a once-only state machine moving exactly once from pending to fulfilled or rejected. The sharpness lies in reifying the deferral itself as a passable, composable object.
How would you explain it like I'm…
The Claim Ticket
Answer Coming Later
Placeholder For a Value
Broad Use¶
- Computer science: futures and promises in Java, JavaScript, Scala, Rust;
async/await; reactive streams. - Distributed systems: RPC return values, remote object references, an agreed consensus value seen from a participant.
- Finance: futures contracts (deliver at a fixed date and price), forwards, options as conditional futures.
- Commercial law: escrow accounts (the escrow holder as a producer with conditional authority), letters of credit, layaway.
- Civil contracts: pre-orders, reservations, lease-with-option-to-buy.
- Healthcare: surgical waitlists and organ-allocation queues — slot promises contingent on triage.
- Diplomacy: treaty commitments that fulfill at named conditions.
Clarity¶
Distinguishes a value from a handle on a future value, making "what if the producer never fulfills?" immediately askable, and surfaces the producer–consumer authority split that underlies many disputes mis-framed as content disputes.
Manages Complexity¶
Turns invisible temporal coupling into a manipulable object: who-waits-on-what is expressed as a written, composable dependency graph (wait-for-all, wait-for-first, chain-after) rather than tracked in the head.
Abstract Reasoning¶
Forces case-completeness over three outcomes — pending-forever, fulfilled, rejected — and licenses authority decomposition (who may fulfill, reject, timeout, cancel) and a composition algebra of then/all/race.
Knowledge Transfer¶
- Software → smart contracts: the explicit pending/fulfilled/rejected state machine was imported into on-chain settlement protocols.
- Commerce → cryptography: third-party-authority escrow was re-implemented as cryptographic timelocks and multi-party signing.
- Finance → software: centuries-old futures contracts supplied the conceptual base that programmatic reservation systems inherit.
Example¶
A JavaScript Promise from fetch(url) is a value returnable before the response exists; .then/.catch attach continuations, the runtime's network layer is the sole producer, and Promise.all([a,b,c]) composes the dependency graph into a written object.
Relationships to Other Primes¶
Parents (1) — more general patterns this builds on
- Future Or Promise is a kind of State and State Transition — The file: 'Not state_and_state_transition in general — a future has a CONSTRAINED state machine': a single irreversible transition pending -> fulfilled|rejected. A specialization of state_and_state_transition (general machines cycle/revisit).
Path to root: Future Or Promise → State and State Transition
Not to Be Confused With¶
- Future Or Promise is not Lazy Evaluation because lazy evaluation defers computation until a value is demanded (pull-driven), whereas a future reifies a deferred result whose producer drives fulfillment independently of when the consumer asks.
- Future Or Promise is not Optionality because optionality is the right-without-obligation to act later, whereas a future is a commitment to resolve exactly once.
- Future Or Promise is not a Commitment Device because a commitment device binds a future self's behaviour by removing options, whereas a future is a data-flow placeholder with no self-binding.