Jot

Design Rationale

Why Jot Exists

Jot exists because there are few good imperative languages that stay easy to use while also offering the kind of strict, inference-driven type system associated with OCaml and ML languages.

Imperative languages are usually weakly typed

The easiest imperative languages to write are often dynamic or loosely typed. They move quickly early, but type issues surface later and are harder to reason about at scale.

Strong type systems are mostly in functional-first languages

Languages in the ML family show how effective Hindley-Milner style typing can be. But many teams still want a straightforward imperative model for day-to-day code.

Jot is an attempt to close that gap

The target is simple: keep imperative code easy to write while retaining strict static checks and inference quality associated with OCaml and other ML-style systems.

Why Truffle

HM inference is static; optimization in imperative code is runtime-sensitive

Jot uses Hindley-Milner style inference for static checking, but execution behavior still depends on real program paths. Truffle is used to adapt at runtime rather than forcing one fixed optimization strategy up front.

  • Hindley-Milner inference gives strong static guarantees, but imperative programs still create mixed runtime behavior across mutation, control flow, and call sites.
  • The same generic function can appear monomorphic on one hot path and polymorphic across the broader program. Optimizing both cases with one static strategy is hard.
  • Truffle lets nodes profile real execution, specialize aggressively for stable monomorphic paths, and deopt safely when polymorphic behavior appears.
  • That gives Jot a runtime model that stays correct under type-general code while still unlocking performance from concrete runtime patterns.

Design Principles

What this project prioritizes

  • Prefer clear imperative control flow over clever abstractions.
  • Use strong inference so annotations stay optional in common cases.
  • Fail at compile time when types do not line up.
  • Keep runtime architecture practical and inspectable.

Non-goals

What this project is not optimizing for

  • Not trying to be a pure functional language.
  • Not trying to be dynamically typed for convenience.
  • Not trying to optimize for language feature count.

Next

Read current status and details

Jot is still early. The docs and source are the best place to evaluate what already works and what is still in progress.