Types

Understand primitive types, inference, and where explicit annotations help.

Jot uses static typing with Hindley-Milner inference.

Common primitives

  • Int
  • Float
  • Bool
  • String
  • Unit

Inference

let retries = 3
let name = "jot"

The compiler infers these as Int and String.

Add annotations at boundaries

fn parsePort(input: String) -> Int {
  // ...
}

Public functions and module exports should keep explicit signatures for readability.