Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Architecture Decision Records

This directory records why Korrin is the way it is. Each file captures one decision — the context that forced it, the choice made, the consequences, and the alternatives rejected. The process itself is ADR 0000.

New ADRs use template.md. Every ADR must appear in the table below; CI (crates/korrin/tests/adr.rs) enforces that, and that each ADR has the required sections. README.md and template.md are exempt.

For what Korrin does (as opposed to why), see the specification.

Index

#TitleStatus
0000Architecture Decision Records: the processAccepted
0001Indentation defines blocksAccepted
0002Documentation is enforced by CIAccepted
0003Newlines terminate statementsAccepted
0004A tree-walking interpreter firstAccepted
0005Methods take an explicit self parameterAccepted
0006The Milestone 1 keyword setAccepted
0007INDENT / DEDENT tokenization, spaces onlyAccepted
0008Byte-offset spans, one diagnostic type, ariadneAccepted
0009Only nil and false are falsyAccepted
0010Numeric model: int/float split, / true division, checked overflowAccepted
0011Bare assignment, lexical block scope, nearest-binding ruleAccepted
0012Cargo workspace: library plus thin CLIAccepted
0013Dependency policyAccepted
0014Built-in collection operations are free functions (M1)Accepted — amended by 0016
0015String interpolation — every string, {expr}Accepted
0016Operations on built-in values are methods (amends 0014)Accepted
0017Exceptions for error handling (try / except / finally / raise)Accepted
0018The module system (import, module objects, _ privacy, cycles are errors)Accepted
0019Built-in modules and the first standard library (math)Accepted
0020The io module and standard-library principlesAccepted
0021A Host trait decouples native functions from the execution engineAccepted
0022Names resolve lexically, not by runtime search (narrows 0011)Accepted
0023Closures capture variables, not scopesAccepted
0024The tree-walking interpreter is kept as a differential-testing oracleAccepted
0025finally is inlined at every exit the compiler can seeAccepted
0026korrin-lsp's transport: lsp-server, no async runtimeAccepted
0027Diagnostics: first-failing-stage only for v1Accepted
0028Hover text is compiled from the specification, not read at runtimeAccepted
0029Go-to-definition is a standalone scope walker, single-file for v1Accepted
0030Node and TypeScript, scoped to the VS Code client onlyAccepted
0031Package distribution: git, no registryAccepted
0032Bare-name imports merge installed packages with built-insAccepted
0033The korrin-pkg crate and its dependency tierAccepted
0034The community package index: a second static siteAccepted
0035Native modules load by compile-time linking, not dynamic loading or WASMAccepted
0036Value::NativeObject: one opaque object type per moduleAccepted
0037The native-module rebuild mechanismAccepted
0038No auto-detect/re-exec for a project's native binaryAccepted

Open questions

Decisions we know we need to make but have deliberately deferred. Each becomes a Proposed ADR when work starts on it.

  • Floor-division operator (//). Only if int(a / b) proves insufficient in practice.
  • Arbitrary-precision integers. Whether int should stop being i64.
  • Multiple / typed except clauses. Deferred; Korrin has no exception hierarchy to filter on yet (0017).
  • Per-file diagnostics for imported modules. Errors inside an imported module currently surface at the import site as text; a caret into the imported file needs multi-file rendering (0018). Resolved: string interpolation (0015); methods on built-in types (0016, amending 0014); string indexing is s[i] for one character and s.slice(a, b) for a range; error handling is exceptions (0017); modules are path-resolved objects (0018) and the standard library rides the same mechanism (0019); packages are git repositories with no central registry, resolved through the same bare-import syntax as built-ins (0031, 0032).