Chapter 14
What Rill deliberately does not have
- Mutation. No mutable bindings, no mutable fields. State is threaded through arguments or channels. The exceptions are the two kinds of storage: a buffer element,
b[i] = v(and+=,-=,*=,/=), and a map entry,m[k] = v. Neither is a binding that changes — what changes is the storage the name has always pointed at. - Exceptions. Errors are
Resultvalues, and?carries one out without the carrying being written. - Null. Absence is
Option. - Implicit conversions. Numeric types never mix silently.
- Field assignment. A field is read with
p.xand never written: a record is a value, and a changed one is a new one built from the old. - Inheritance or subtyping. Composition and traits instead.
- A garbage collector. Reference counting, decided at compile time.