What problem does it solve?
Dang's internals expose subtle invariants in the compiler, including multi-pass hoisting, the interaction between copy-on-write mutation and closures, and the Module.Eq subtyping rules.
Core Features & Use Cases
- Explains multi-pass hoisting: top-level type-like declarations are hoisted before bodies are inferred, enabling mutual references.
- Details scoping mechanics: Clone, Fork, and the dynamic-scope cell model that shares self across a method call and how NewDynamicScope / SetDynamicScope control mutation visibility.
- Documents Module.Eq subtyping and how asymmetry affects assignment and interface/union relationships.
Use when editing pkg/dang/ infer/eval/scope code, adding a new type-like declaration, or debugging mutation/scoping issues.
Quick Start
Explain the forward-reference handling and hoisting order for a new type-like declaration in Dang.