Epistemic Types
Uncertainty, confidence, and provenance as first-class program data.
Epistemic Types
Sounio is designed for scientific and regulated computing, where a value is rarely “just a number.” Measurements and derived quantities should carry:
- uncertainty (metrology)
- confidence/credibility (trust)
- provenance (origin + transformation history)
The core building block is Knowledge<T>: a value wrapper that prevents you from silently discarding epistemic metadata.
What Works Today (Compiler Reality)
The compiler currently supports a minimal but important invariant:
- you can construct
Knowledge<T>values, and - extracting a plain
Trequires an explicit operation with a reason string (unwrap("...")).
That means code can’t accidentally drop epistemic information.
Spec vs Implementation
The full design aims for richer behavior: principled uncertainty propagation, confidence monotonicity, and append-only provenance under pure transforms.
Some of that lives in the language spec and stdlib design docs, even if enforcement varies by compiler mode and feature flags today.