Ship

Lexicon · Uniqueness / multiplicity

Uniqueness / multiplicity

Ship modes — circumstantial facts about how a value is used, inferred and checked alongside types. Not types themselves: x: String @ local gives x type String and mode local.

OxCaml calls the once/many axis "linearity"; Ship calls it multiplicity — once is affine (at most once). Uniqueness (past: aliased ≤ unique) and multiplicity (future: many / once / required) ship together: a closure capturing a unique value must be once, or uniqueness is silently duplicated.

Settled Ship catalog in ../16-modes.md:

  • Locality — global ≤ local

  • Uniqueness — aliased ≤ unique

  • Multiplicity — once / required / many

  • Sendability — confined ≤ sendable

    One @ per slot, space-separated modes, enforced order: locality, uniqueness, multiplicity, sendability. Builtin aliases spawnable (= once sendable), transferable (= unique sendable). Inference-first: only @ global (retention) is routinely hand-written; contract spellings live in .shc.

    Field-level cuts use modality.md. Open branches: 100, 101, 102, 180.