The 5-minute tour
1. Entry point
Section titled “1. Entry point”After Install:
vow new quick-demo && cd quick-demovow run src/main.vowecho $? # 0 — scaffold prints "Hello from Vow!"To try a numeric exit code instead, edit src/main.vow:
fn main(caps: Caps) -> int { return 1 + 2}vow build src/main.vow -o quick-demo./quick-demo; echo $? # 32. Types without null
Section titled “2. Types without null”fn unwrap_or(opt: Option<int>, fallback: int) -> int { return match opt { Some(x) => x, None => fallback }}Structs, enums, exhaustive match, static interfaces — see Types.
3. Contracts
Section titled “3. Contracts”fn withdraw(balance: int, amount: int) -> int requires amount > 0 requires amount <= balance ensures result >= 0{ return balance - amount}Runtime checks only — Contracts. Try with tests/lang/withdraw.vow in a repo clone.
4. Capabilities
Section titled “4. Capabilities”fn main(caps: Caps) -> int { return match caps.fs_read { Some(cap) => with cap { match read_file("/tmp/vow_poc.txt") { Ok(s) => len(s), Err(_) => 0 - 1 } }, None => 0 - 1 }}Requires a clone (or your own file) plus a grant at run time:
vow run tests/lang/caps_poc.vow -- --grant fs-read:/tmpOr with needs / with sugar — Capabilities.
5. Modern surface (one glance)
Section titled “5. Modern surface (one glance)”// fragment-onlyvar c = new Counter(0)let tag = if age >= 18 { "adult" } else { "minor" }let area = switch s { case Circle(r): 3 * r * r, case Rect(w, h): w * h,}for i in 0..n { total = total + i }let evens = array_filter(xs, (x) -> x % 2 == 0)print("${name}: ${tag}")let d = maybe ?? 0let v = try fallible(true) catch (e) { e }Then read
Section titled “Then read”- Tutorial — full use-case path (recommended next)
- Syntax ergonomics —
new/switch/try - Limitations — API confinement ≠ OS sandbox
- Changelog — release notes
- Syntax — language reference hub