Aria Programming Guide

Status: โœ… Phase 1 Complete (Type System), ๐Ÿ”„ Phase 2 In Progress (Session 34: Loop Batch 4 โœ… DONE - HALFWAY!) Total Topics: 350 markdown files (9 legacy files removed) Type Guides Complete: 50 comprehensive guides (~41,273 lines) Code Files Fixed: 30 error + 3 lambda/closure + 5 stdlib lambda + 7 loop batch 1 + 15 loop batch 2 + 11 loop batch 3 + 7 loop batch 4 = 78 files Legacy Files Removed: 9 obsolete files (~2,482 lines of outdated docs) Last Updated: February 14, 2026 (Session 34 - Loop syntax batch 4 complete - control_flow/ directory clean - 51% HALFWAY POINT!)

Overview

This comprehensive programming guide covers every feature of the Aria programming language. Each topic has its own dedicated file for detailed documentation.

Current Phase: โœ… Phase 1 COMPLETE - All 50 type guides documented (Sessions 1-26). โœ… Phase 2 Core Rewrites COMPLETE - Lambda/closure docs + stdlib examples fixed + legacy cleanup + loop batches 1-4 (Sessions 29-34). Recent Work (Feb 14, 2026):

See UPDATE_PROGRESS.md for detailed status and SYNTAX_AUDIT_FEB14_2026.md for Phase 2 roadmap.


Phase 2: Syntax Cleanup (In Progress - Session 34: Loop Batch 4 โœ… DONE - 51% HALFWAY POINT!)

Completed Issues โœ…: - HIGH PRIORITY (101 loops):

* control_flow/iteration_variable.md (39 loops) - Teaches iteration patterns, $ index access * control_flow/for.md (35 loops) - Teaches till loops (renamed from for loops) * control_flow/dollar_variable.md (27 loops) - COMPLETELY REWROTE: $ is index, not mutation marker! - MEDIUM PRIORITY (33 loops): * control_flow/continue.md (18 loops) - Skip iteration patterns * control_flow/for_syntax.md (15 loops) - Complete syntax reference (renamed to "Till Loop Syntax") - LOWER PRIORITY (21 loops): * control_flow/break.md (11 loops) - Exit loop patterns * control_flow/while.md (1 loop) - Comparison example - PRESERVED: * control_flow/loop.md: C-style for loops + Python/Rust/C comparisons * control_flow/till.md: C-style for loops + Python/Rust/C comparisons - IMPACT: CRITICAL - These files TEACH users how to write loops! - If wrong, users learn for item in collection (doesn't exist in Aria) - Similar to Session 32's range operators teaching wrong syntax - Teaching files must be accurate or users learn broken patterns - 266/517 total loops fixed (51% - HALFWAY POINT!)

- memory_model/gc.md, borrowing.md, stack.md (11 loops) - Garbage collection, borrow patterns, stack allocation

- memory_model/borrow_operator.md, allocators.md, mutable_borrow.md, immutable_borrow.md (8 loops) - memory_model/aria_gc_alloc.md, address_operator.md, aria_alloc_array.md, pinning.md (4 loops) - Preserved: 7 C-style for (;;) loops (valid Aria syntax for performance code) - All converted from wrong for i in 0..n โ†’ correct till(n-1, 1) syntax

- CRITICAL: operators/range.md, range_exclusive.md, range_inclusive.md (19 loops)

- Issue: Range operator reference docs were teaching Rust for-in syntax as Aria! - Fix: Clarified .. and ..= are for SLICING, not loops; added prominent warnings - Impact: HIGH - These are foundational operator docs users learn from - operators/iteration.md, add_assign.md, mul_assign.md (6 loops) - operators/add.md, div_assign.md, divide.md, increment.md, left_shift.md, lshift_assign.md, mod_assign.md, modulo.md, not_equal.md (9 loops) - All converted from wrong for i in 0..n โ†’ correct till(n-1, 1) syntax

- types/int1024_int2048_int4096.md: 11 loops (cryptographic operations, cache patterns)

- types/uint1024_uint2048_uint4096.md: 16 loops (Merkle trees, modular exponentiation) - types/tfp32_tfp64.md: 12 loops (deterministic physics, blockchain consensus) - types/frac8_frac16_frac32_frac64.md: 10 loops (exact financial math, zero drift) - types/Handle.md: 6 loops (neurogenesis, arena integrity) - types/Q3_Q9.md: 1 loop (quantum confidence accumulation) - debugging/dbug.md: 1 loop (debug group enumeration)

- types/: array.md, array_declaration.md, array_operations.md, func.md, func_declaration.md

- control_flow/: return.md - standard_library/: reduce.md (old version) - memory_model/: wild.md, wildx.md - Rationale: All used obsolete Rust-style Aria syntax from abandoned spec, fully superseded by modern guides

- functions/lambda.md (~470 lines) - Fixed |params| to returnType(params) { body }

- functions/anonymous_functions.md (~320 lines) - Same syntax as regular functions - functions/closure_capture.md (~480 lines) - Value vs pointer capture (no $variable magic)

- stdlib/ (10 files): http_client, readFile, writeFile, exec, math, stream_io, wait, httpGet, readJSON, process_management

- types/ (18 files): Handle, Result, ERR, NIL, all integer types, flt64, string, func_return, tensor - functions/ (1 file): function_return_type - operators/ (1 file): question_operator

Remaining Issues: - 51% COMPLETE (266/517 loops fixed!)

- Next targets: advanced_features/, modules/, io_system/, standard_library/ (remaining subdirs)

- NOT in active programming guide - orphaned legacy files Session 27-34 Achievements: Next: Session 35 - Continue loop syntax corrections in remaining directories

Guide Structure

๐Ÿ“ฆ Types (80+ files)

Comprehensive coverage of Aria's type system:

๐Ÿง  Memory Model (18 files)

Memory management and safety:

๐Ÿ”„ Control Flow (21 files)

All control structures:

โš™๏ธ Operators (59 files)

Complete operator reference:

๐Ÿ“‹ Functions (24 files)

Function system and advanced features:

๐Ÿ“š Modules (18 files)

Module system and FFI:

๐Ÿ’พ I/O System (15 files) โœ… COMPLETE

6-stream topology (Hex-Stream): 4,270 lines

๐Ÿ“– Standard Library (23 files)

Built-in functionality:

๐Ÿš€ Advanced Features (26 files)

Language advanced capabilities:


Quick Reference

File Organization

programming_guide/

โ”œโ”€โ”€ types/ (74 files) - Type system โ”œโ”€โ”€ memory_model/ (18 files) - Memory management โ”œโ”€โ”€ control_flow/ (21 files) - Control structures โ”œโ”€โ”€ operators/ (59 files) - All operators โ”œโ”€โ”€ functions/ (24 files) - Function system โ”œโ”€โ”€ modules/ (18 files) - Module system & FFI โ”œโ”€โ”€ io_system/ (15 files) - 6-stream I/O โ”œโ”€โ”€ standard_library/ (23 files) - Built-in functions โ”œโ”€โ”€ advanced_features/ (26 files) - Advanced topics โ””โ”€โ”€ README.md (this file) - Master index

Usage

Each .md` file corresponds to a specific language feature and will contain:


Navigation Tips

1. By Category: Browse folders for related topics 2. By Feature: Use file names (self-documenting) 3. Full-Text Search: All files follow consistent naming 4. Cross-References: Files link to related topics


โš ๏ธ CRITICAL: Type System Changes (January 9, 2026)

Aria now enforces ZERO implicit type conversions. ALL numeric literals MUST have explicit type suffixes.

Quick Start: Examples:
// โŒ OLD (broken):

uint32:mask = 1; int32:count = 0;

// โœ… NEW (required): uint32:mask = 1u32; int32:count = 0i32;

Rationale: Child-safety requirement for Nikola - no hidden assumptions or behavior.

Development Status

Strategy: Fill content file-by-file as needed during:

Related Documentation


Status: Ready for incremental content population Repository: https://github.com/alternative-intelligence-cp/aria_ecosystem License: AGPL-3.0