Design philosophy#

Meta: the "why is it like this" page, in one arc: principles → what they rule out → what they produce. Keep it opinionated and short. The applied list is mental-model seeds — one bullet per "thing you won't have seen elsewhere," each linking to the chapter that owns it; don't repeat topic-page material here.

Deliberately missing#

The philosophy, applied#

These principles are why Dang reads the way it does — the things you'll notice are different, each owned by its own chapter:

Immutable, copy-on-write, checked#

Values never change. Methods on types look like they mutate, but each call works on its own copy of self and returns it, so whatever you hold stays as it was. Names are lexical: a block or method ref sees the variables and self where it was written, never the caller's. And the compiler rejects every way a write could leak out of the scope that owns it: functions can't write globals, nothing can write statics, closures that write their scope can't be stored, {{ }} fields can't write outside themselves, and defaults can't see a half-built object. See Mutation and copy-on-write.