the specification

kanso language specification — v0.1 (design freeze, july 2026)

working name kanso (japanese: simplicity through elimination of clutter), extension .kso. pronounced KAHN-so, unvoiced s.

this document is the authoritative record of every design decision gaveled to date. anything marked open is not yet decided. the founding principle behind every rule:

anything a style guide, linter, or code review would enforce by convention, kanso enforces by making the alternative a compile error or unrepresentable. programs have a canonical form: one rendering per program. the source file contains only decisions; all derivable information lives in tooling (LSP inlays, publish diffs).

the annotation doctrine (governs everything): an annotation is legal iff it carries a stipulation the compiler cannot derive. redundant annotations are compile errors. this one rule decides return types (never written), interfaces (deleted), type variables (written only when stipulating), typeset guards (written because enumeration is non-derivable), and field types (written because declarations have no body).

the ordering principle: order is never implicit. ., >>, and recursive data flow are the complete vocabulary of "before." where there is no mutation, the runtime owns order (reorder, parallelize, dedupe, cache freely).

section 01purity and effects

section 02errors

section 03types

type user
  admin: bool
  email: string
  name: string

section 04typesets and unions

typeset signed
  int
  int16
  int32
  int64
  int8

typeset numeric
  float32
  float64
  integral

section 05dispatch and overloads

section 06auto-propagation

section 07constraints and generics (no interfaces)

type cache[a]
  entries: a[string]
  fallback: a

type matrix[n: numeric]
  ...

section 08containers

section 09bindings, rebinding, flow

section 10memory model

section 11concurrency and processes

section 12modules

section 13numerics and strings

section 14open questions (priority order)

  1. inference fixpoint formalization. dispatch depends on types; types depend on generated pass-throughs; pass-throughs change return sets. plan: propagable sets as monotone least fixpoint over the call graph, then dispatch resolution, with programs where dispatch would feed back into sets rejected. do this on paper before any code. unions-as-values made the lattice natural; the stratification proof is still owed.
  2. destructuring syntax: list patterns (fn sum [], cons/rest spelling), multi-field record patterns, partial patterns with _.
  3. qualification syntax (§12).
  4. build totality (§10).
  5. pipe-vs-rebind canonicality (§9).
  6. map literals.
  7. multi-way conditional.
  8. ffi (route through effect descriptions at the edge; 1-based translation layer lives there).
  9. build tool (kanso run/build/test/publish; publish does contract diffs).
  10. numeric coercion.
  11. process details: mailbox ordering guarantees, selective receive or strict FIFO, restart policy vocabulary.

section 15implementation plan