The Korrin guide
A hands-on introduction. Read it front to back once; keep the specification open afterwards as a reference.
Every code block below is run by CI, so what you see is what Korrin does.
- Getting started — install, run a file, use the REPL.
- Values — numbers, strings, booleans,
nil, lists, maps. - Control flow and functions —
if, loops,fn, closures. - Classes — objects, methods, inheritance,
super. - A worked example — a small program, start to finish.
The whole language on one page
- Blocks are indentation; a newline ends a statement. No braces, no semicolons.
- 19 keywords:
and break class continue elif else false fn for if in nil not or pass return super true while. #starts a comment.- Assignment is bare:
x = 1. Nolet. - Every string interpolates:
"hi {name}";{{is a literal brace. - Operations on
str/list/mapare methods:xs.push(v),text.trim(),m.keys(),x.len().print,str,int,range, … stay functions. - Only
nilandfalseare falsy. /always gives a float; integer overflow is an error, not a wraparound.