Files
aji/docs/reference/design-decisions.md
T
dev 17a55a7fef Initial import: Aji 0.1 draft spec and Zig scaffolding
Draft specification, RFCs, reference registries and examples, plus the
reference-implementation skeleton: build.zig, diagnostic envelope with
error-code registry synced to docs, aji CLI, conformance runner with seed
tests, CI and contributor docs.
2026-10-04 11:59:13 +03:00

42 lines
1.2 KiB
Markdown

# Design Decisions
This file records short decisions whose rationale does not yet justify a standalone RFC.
## DD-001 — Checked arithmetic by default
Normal integer arithmetic traps on overflow. Wrapping/saturating arithmetic is explicit.
Reason: release/debug behavior must not diverge, and arithmetic assumptions should remain visible to agents/verifier.
## DD-002 — No exceptions
Errors are values. No stack unwinding.
Reason: explicit CFG and resource cleanup are easier to verify and replay.
## DD-003 — No hidden destructors
Cleanup constructs lower to explicit AIR edges.
Reason: hidden control flow harms auditability and agent repair.
## DD-004 — Bounded channels by default
Unbounded queues require explicit library choice.
Reason: memory growth must not be implicit.
## DD-005 — No default atomic ordering
Every atomic operation states its order.
Reason: the compiler must not hide one of the most consequential concurrency choices.
## DD-006 — No arbitrary safe atomic pointer type initially
Reason: reclamation cannot be separated from safe publication.
## DD-007 — Interpreter before optimizer/backend
Reason: executable semantics and verifier behavior must stabilize before native-code complexity is introduced.