Values and Expressions(v2 · en)
Concept
A Zio program is a sequence of expressions; every expression evaluates to a value. Values have kinds but no implicit coercions — scalars (integers, floats, strings, characters, keywords, booleans, nil) and composites (vectors, maps, sets). A call form (head argument...) evaluates the head first, then the arguments left to right.
(println (let [x 2] (+ x 40)))
(println (if nil "yes" "no") (if 0 "yes" "no"))
Expected stdout:
42
no yes
There is exactly one truthiness edge: nil and false are falsy, everything else — including 0 — is truthy. Failure is part of the evaluation contract too: a typed error is a boundary event of the value world, never a silent fallback.
Revision notes (v2)
The shapes of numeric literals, precision and overflow rules are split into the standalone concept Numbers and Precision as of this version: integer overflow errors, truncation toward zero, the mod sign convention, 0x / _ literal forms and exact arbitrary-precision integers beyond i64 all live there. This concept keeps the evaluation model itself and no longer carries numeric detail. See the mapping entry in version maps.
Code itself is data: quote suspends evaluation, quasiquote assembles structure from a template, and eval hands the data back to the evaluator. That round trip — code ↔ data — is the ground macros stand on.
(println '(+ 1 2))
(println (let [x 3] `(+ ,x 1)))
(println (eval '(+ 1 2)))
Expected stdout:
(+ 1 2)
(+ 3 1)
3
Going further
"Everything is an expression" is the shared stance of the Lisp family; the price is that a reader must distinguish "forms that evaluate to values" from "data that does not evaluate". Next: Bindings and Scope — how values get named and how long a name lives. For a runnable experiment, see the macro expansion experiment.