Skip to main content
computer-science economics law

Reference vs value

Description

reference-vs-value names a recurring design fork: do you hold a thing by pointing at the canonical original, or by making an independent copy? The reference horn gives shared identity — there is one source of truth, every holder sees the same thing, and a change made through one holder propagates to all. The value horn gives isolation — each holder has its own copy, mutations stay local, and the copies drift independently. Neither is correct in the abstract; the concept names the tradeoff, which is why it is a duality and not just the “reference” primitive or the “copy” primitive on its own. The shape recurs well outside its software home. In programming, pass-by-reference aliases the caller’s object (mutations propagate) while pass-by-value copies it (mutations are isolated). In law, incorporation-by-reference points a contract at another document so its terms apply, versus reproducing the text verbatim as a frozen copy. In finance, a derivative references an underlying asset for economic exposure versus actually holding the asset. In cognition, a symbol references a concept versus instantiating the concept itself. The home-domain term-of-art (pointer, alias, call-by-sharing) lives in the body; the cross-domain shape is the fork between shared-identity-with-propagation and isolated-independence. The concept is self-exemplifying in the engine: consolidating a schema into an atomic entity that participates by reference in higher-order structure (rather than re-inlining its full content) is the reference move applied to the slot-filler mechanism.

Triggers

User-initiated: User faces a fork between linking to a canonical source and duplicating it. Vocabulary cues: “by reference vs by value,” “pointer or copy,” “link or duplicate,” “cite or quote,” “single source of truth vs snapshot,” “will my change propagate?” Agent-initiated: Agent notices two holders of a thing and a question of whether a change to one should be visible to the other. Candidate inference: name the tradeoff — shared identity and propagation (reference) vs isolation and independence (value) — and surface which property the situation actually needs. Situation-shape signals: Shared-mutable-state vs immutable-copy decisions; “should this be a link or an embedded copy?”; citation vs reproduction; any place where the binding question is whether downstream change should be seen by all holders or contained.

Exclusions

  • A single context-bound act of pointingdeixis is reference whose meaning is fixed by utterance context; reference-vs-value is the design tradeoff, not resolving one reference.
  • A stand-in controlling access to a referent — a proxy lives wholly on the reference horn; reference-vs-value is the upstream fork over whether to reference or copy at all.
  • Copying purely for speedcaching is the value horn chosen for latency, on a fresh-vs-stale axis; reference-vs-value’s axis is identity and propagation.
  • When the choice is foreclosed — if a thing intrinsically can’t be copied (unique title) or can’t be shared (value type), there is no live fork and the duality degenerates.

Structure

Internal structure of reference-vs-value: a table of its component slots and the concepts that fill them.

Relationships

Relationship neighborhood of reference-vs-value: a graph of the concepts it connects to and the concepts it is a part of.
  • deixis — the linguistics of the reference pole; reference-vs-value contains referencing as one horn of a choice.
  • proxy — a structure on the reference horn; reference-vs-value is the fork upstream of choosing a proxy.
  • context-asymmetry — reference couples holders into shared identity; value deliberately severs that coupling, drawing a context boundary.
  • eager-vs-lazy — a sibling X-vs-Y duality: a binary fork with a cost-tradeoff and a gradient of intermediate positions; eager-vs-lazy forks on when, reference-vs-value on how to hold.

Examples

Robert W. Sebesta, "Concepts of Programming Languages" (Pearson, ch. 9 "Subprograms") — the standard treatment of parameter-passing modes. · computer-science

The namesake fork. When a subprogram is called, pass-by-value copies the caller’s argument into an independent local parameter: the two are separate, and mutations inside the callee stay isolated — they do not affect the caller. Pass-by-reference instead gives the callee an alias or access path to the caller’s actual variable: now both names refer to the same storage, so a mutation propagates back. The choice is the whole content of the concept — shared identity and propagation on one horn, isolation and independence on the other.Inference: Sebesta’s treatment also names the intermediate point that makes this a gradient rather than a hard binary, which the catalog duality predicts. Many modern languages (Java, Python, JavaScript) are strictly pass-by-value, but the value passed is itself a reference to an object — “call-by-sharing.” You can’t rebind which object the caller’s variable names, yet you can mutate the shared object’s internal state, so propagation happens for mutations but not for reassignment. That hybrid is exactly the copy-on-write / immutable-snapshot-with-link region between the two horns — evidence that reference-vs-value names an axis with occupied middle positions, not just two endpoints.

Black's Law Dictionary, entry "incorporation by reference"; U.S. Office of the Federal Register, "Document Drafting Handbook" (ch. 6, on incorporation by reference in federal regulations). · law

Legal drafting instantiates the fork at the document layer. Incorporation by reference lets a contract or regulation point at another document — a standard, a schedule, a prior agreement — so its terms apply “as if fully set out therein,” without reproducing the text. The alternative is to reproduce or quote the text verbatim, embedding an independent copy in the host document. Black’s Law Dictionary fixes the reference move; the Federal Register’s drafting handbook governs its regulatory use.Inference: The propagation behavior is the sharp test, and law makes it explicit in a way that refines the catalog claim. Whether a change to the referenced document propagates depends on the mode of incorporation: dynamic incorporation (“as amended from time to time”) points at the living document so updates flow through, while static incorporation freezes the referenced text as of signing — the default in many jurisdictions, and the rule for U.S. federal regulations. So “reference” here actually spans both a propagating sub-mode and a frozen sub-mode, whereas reproduced text is always frozen. The lesson for the concept: the reference horn’s defining affordance is that propagation is available (and must be opted into), while the value horn forecloses it by construction.
In derivatives markets, the same fork appears as reference versus holding. A total return swap or a credit default swap references an underlying asset — a bond, an index — to deliver its economic performance to the holder without conveying legal title. The alternative is to hold the underlying outright. Referencing gives synthetic exposure linked to the underlying’s price; holding gives the asset itself, a self-contained position.Inference: The finance case usefully exposes what the reference horn pays for, and corrects a loose framing. “Shared identity” isn’t industry vocabulary; the accurate term is economic equivalence — the derivative tracks the underlying’s value via a reference price. But referencing rather than holding is not free: it introduces counterparty risk (the swap’s other side can default, a risk absent when you hold the asset) and typically forgoes governance rights like voting. That maps to the catalog tradeoff precisely: the reference horn buys cheap, propagating exposure to a canonical original but couples you to that original and to the intermediary, while the value horn (holding) buys an independent, self-contained position at the cost of capital outlay and duplication of what the reference could have tracked synthetically.