Changing a language without breaking the world
PeaLang is a language, not an app — changes outlive the person who proposed them. The bar is deliberately high, and that's why existing programs keep running.
The rules of the road
- Compatibility first. No breaking change to syntax, semantics or stdlib without a documented migration path and a deprecation window. The registry in
spec/is the source of truth;pea specenforces it. - Both engines or neither. New behavior must be implemented in the interpreter and the VM, with differential corpus coverage. A VM-only or interpreter-only change will not be merged.
- Security is not negotiable. Anything touching capabilities, limits, the boundary or serialization gets a threat-model note and security-boundary test coverage.
- Spec before code. Grammar, feature registry and compatibility rules change first; implementation follows. Undocumented behavior is a bug.
What a good PR looks like
- A one-paragraph motivation: what user problem does this solve?
- Spec delta (grammar/registry/compat rules) or an explicit statement that none is needed.
- Implementation in both engines + corpus cases.
- Docs: guide chapter update or a docs/design note.
- Compatibility note: is this additive, deprecating, or breaking? Migration guidance if the latter.
- CI green, including the differential and security-boundary gates.
Migration notes and deprecation
Deprecations follow a predictable path: announce (warning), migrate (tooling helps, e.g. pea migrate), remove (next major). If you're removing something, include the migration recipe and keep the old diagnostic helpful — "unexpected token" is not an error message, it's an admission of failure.
Review discipline
Reviews are recorded and scoped. The exit question is never "does the author like it?" but "would we merge this if we had to support it for ten years?" Expect at least one reviewer to run your branch against their own evil-input corpus. Expect requests for more tests from hosts nobody asked you about. That's the process working.
Where to contribute
- Issues — bugs with minimal repro, or proposals tagged
language-change. - Chapter 25 of the guide — Language internals and contribution, including extending syntax, adding stdlib capabilities and testing language changes across engines and hosts.
- Security issues: see
SECURITY.mdin the repo — do not file public issues for vulnerabilities.