Landin specification 0.1.0 source
specification 0.1.0

Landin

Ada, but small. Zig, but sweeter. One systems language from 32KB to 32TB. Move fast, keep the pointers, and let the compiler tell you when you are being an idiot.

Named after Peter Landin, who coined the term "syntactic sugar" and wrote "The Next 700 Programming Languages". This one is the 701st.

Status: specification 0.1.0. The compiler does not emit code yet. The bootstrap chassis is built and tested on three environments, and the frontend is complete: refine scans, parses, resolves every name, and checks every type and every definite assignment, says what it could not read, and says which work enables anything it refuses.

what it looks like

0040Full form: name, type, value
greeting: utf8 = "hello"
0870A function is a value of a function type
double: (x: i32) -> (r: i32) =
    r = x * 2
end double
0940Errors: a declared set of atoms in one dedicated register
open_file: (path: utf8) -> (handle: u32) ! not_found | no_access =
    fail no_access when lenof path == 0
    handle = 1
end open_file

Every construct is numbered, and the numbers do not move. Read the tour for the other 170.

start here

every document

the specification

the specificationThe grammar of the enabled kernel, and the rules the tour left unsaid. Normative.22 constructs in 2 sections the tourThe normative specification, as a numbered tour. Every construct keeps its number.173 constructs in 19 sections

the prototypes

prototype 1 — driverA driver from an ugly vendor SVD: GPIO, an interrupt-driven DMA UART, a vector table, and not one hand-written bitmask.0 constructs in 4 sections prototype 2 — parserA parser that recovers, because a real one must not stop at the first mistake.0 constructs in 6 sections prototype 3 — containersA generic container library: growing array, small vector, hash map, arena-backed tree.0 constructs in 9 sections prototype 4 — applicationA hosted application whose shape is decided by its command line, so it cannot be written without runtime dispatch.0 constructs in 7 sections

the project

the projectWhat Landin is, what is in the repository, and how to build the part of it that exists.6 sections the roadmapThe sole durable authority for open work: phases, dependencies, gates, and every inherited disposition.16 sections the design, in one pageThe design and the principles behind it, and which decisions must not be quietly reversed.7 sections

the implementation

the bootstrap compilerThe Ada 2022 chassis: what each package owns, what it may not own, and what is deliberately absent.4 sections the pinned toolchainOne compiler, recorded exactly, with the warning policy and the checksums that verify it.5 sections the environmentsWhich machine produces which kind of evidence, and which one is the authority.5 sections the fixturesThe test format that has to outlive the implementation currently checking it.7 sections the malformed casesTrees that exist to be rejected, and the fault each one carries.0 sections