Static copy
Copied from docs/en/decisions/adp-012.md in https://github.com/poppy-team/aipo-lang (MIT). Pinned to revision ce47c4e070404fc41722ccd8e2b7b808b99062a8, blob 9ace2f37bbc6bbabc4a8504868578fa3e7e6d6db. The source repository remains canonical; this copy is refreshed through a sync pull request, not live.
Aipo is engineered to minimize cognitive overhead and deliver a clean, inclusive, and deterministic developer experience, tailored to be especially welcoming for neurodivergent developers (ADHD and dyslexia):
var.: syntax in dictionary literals and typed struct instantiations, eliminating motor dissonance and typo risks.{ ... }) fn, struct, impl, if, while, loop, repeat, each, match, attempt, await do) are enclosed in curly braces { ... }.if x > 10 { ... }, while active { ... }, each item in list { ... }.struct declarations, all fields are strictly immutable by default. Simply declare the field identifier (id, created_at).var: var status = "offline".var is statically rejected by the compiler (AIPO_SEM_IMMUTABLE_FIELD_REASSIGN).:) StructName{ field: value, ... } syntax, matching dictionary literals { "key": value } with complete motor symmetry.var self impl blocks, unannotated receivers are strictly read-only (self).var self: fn increment(var self) { ... }.var is the universal keyword for mutability.// and //=) // and //=, preserving symbolic harmony alongside +, -, *, /.loop { ... } (unconditional), while c { ... } (conditional), repeat n { ... } (finite count), and each x in col { ... } (collection iteration).| Canonical Guideline | Canonical Syntax | Cognitive & Ergonomic Benefit |
|---|---|---|
| Structured Blocks | if c { ... }, fn f() { ... } | Unambiguous visual scope with native rainbow brackets and code folding |
| Struct Immutability | struct User { id, var status } | Immutability by default; mutation requires explicit intent via var |
| Symmetric Instantiation | User{ id: "1", name: "Ana" } | Perfect visual and motor symmetry with dictionary literals { k: v } |
| Mutator Receiver | fn inc(var self) { ... } | Semantic unification: var is the universal keyword for mutability |
| Formal Interfaces | interface Drawable { ... } | Pure structural subtyping without boilerplate ceremony or artificial coupling |
| Integer Division | a // b, a //= b | Mathematical consistency and symmetry with all arithmetic operators |
aipo-lexer: Emits SlashSlash (//), SlashSlashEq (//=), curly braces { and }, and canonical keywords.aipo-syntax: Parses recursive brace blocks, immutable fields by default, explicit var, and struct instantiation with :.aipo-sema: Enforces static type checking, field immutability, structural interface conformance, and var self receiver validation.aipo-formatter: Ensures idempotent formatting with 4-space indentation and canonical brace alignment.aipo-vm, aipo-wasm, & aipo-js: Emit and execute corresponding code with 100% bit-exact determinism across backends.