Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

/development/milestones/v0.10.0.md

Nocter v0.10.0 Milestone

Status: Phase 0, Phase 1, Phase 2, and Phase 3 completed.

Purpose

v0.10.0 removes compiler representation and source-organization gaps that would otherwise constrain practical standard-library APIs. The published v0.9.0 language, package, ownership, standard-library, and editor contracts remain the compatibility boundary until v0.10.0 is qualified. New behavior must not weaken checking or introduce module-name exceptions.

Phase 0 completed native value capabilities. Phase 1 completed the breaking directory-module model specified in v0.10.0 Phase 1: nocter.nct owns package declarations, index.nct owns a module's public surface, and explicitly imported implementation sources compose that module without creating namespaces.

Phase 2 completes that source model by separating root-owned public callable contracts from bodies in composed implementation sources and then normalizing standard-library module boundaries. Its contract and completion gate live in v0.10.0 Phase 2.

Phase 2 completed on 2026-08-09. CallableBodyIndex now owns declaration, body, and callable-input identity across semantic analysis, native compilation, and editor tooling. The standard library uses conceptual directory modules with focused implementation sources and no compatibility facades for the removed paths. The detailed evidence is frozen in the Phase 2 record.

Phase 3 removes the remaining standard-library exception by making std an implicit toolchain package and replacing pub(nocter) with ancestor-based pub(...) visibility. Its contract and completion gate live in v0.10.0 Phase 3.

Phase 3 completed on 2026-08-09. One semantic source-scope model now governs private, ancestor-module, package, and universal visibility; re-exports cannot widen that boundary. std is a validated implicit package selected by the active toolchain, while primitive authority is an independent exact-package capability. Compiler and LSP package indexes consume the same identities. The detailed evidence is frozen in the Phase 3 record.

Phase 0: Native Value Capabilities

Phase 0 establishes one semantic capability boundary for native values and promotes every built-in integer type from ABI storage to ordinary executable use. Today nocter check accepts all specified integers while nocter build computes only i32, u8, and usize; generic collection preflight also recognizes std/vec/index.nct by filesystem path. Both limitations make standard-library growth depend on compiler exceptions.

Runtime Type Capabilities

Buildability and lowering classify a resolved type by properties instead of its declaration module:

  • whether it has a concrete ABI value representation
  • whether it may be copied byte-for-byte
  • whether ownership transfer requires recursive drop glue
  • whether an indexed element can be loaded, stored, borrowed, copied, moved, and dropped

Generic bodies consume their concrete substitutions through these properties. No diagnostic or lowering decision may identify std/vec/index.nct, a standard-library type name, or a source path to grant broader behavior. Trusted target primitives remain identity-based because they define the machine boundary rather than a user value capability.

Integer Execution

i8, i16, i32, i64, isize, u8, u16, u32, u64, and usize are ordinary native scalar values. Every type supports:

  • literals, local and parameter bindings, returns, calls, and aggregate fields
  • arithmetic, shifts, equality, and ordered comparison with the language's checked-overflow and division rules
  • lossless explicit conversions already accepted by the type checker
  • fixed-array and slice indexing, assignment, borrowing, and iteration when the element operation is otherwise legal
  • optional and fallible transport, branch values, and interpolation

The IR records integer signedness and bit width once. Lowering and the arm64 backend consume that descriptor instead of reconstructing behavior from source spellings or maintaining one pipeline per integer type. ABI extension, truncation, comparison, shifts, overflow traps, division, memory access, and formatting follow the descriptor.

Verification Gate

  • native check/build/run tests cover boundary values and computed values for every integer type
  • focused tests cover signed minimum values, checked overflow, division by zero, signed division overflow, ordered comparison, shifts, and lossless widening
  • calls, outcomes, aggregate fields, fixed arrays, slices, and generic Vec<T> execution cover narrow and wide integers
  • generic collection diagnostics are derived from resolved type capabilities and contain no standard-library path exception
  • existing ownership, drop, provenance, package, LSP, and released standard-library behavior remains unchanged
  • the specification no longer describes any built-in integer as storage-only or non-executable
  • development/compiler/scripts/verify.sh, cargo fmt --check, warnings-denied Clippy, documentation generation, and git diff --check pass

Phase 0 is complete only when every gate passes and no implementation TODO remains in its scope. It does not add floating-point types, arbitrary-width integers, implicit numeric conversion, saturating or wrapping operators, SIMD, associated types, mutable slice iterators, or a v0.10.0 release artifact.

Completion Evidence

  • One IntegerType descriptor now owns built-in integer width, signedness, range, canonical ABI word representation, and source spelling across ABI classification, IR, and arm64 code generation.
  • Buildability no longer recognizes std/vec/index.nct by source path. Slice and generic collection operations are accepted or rejected from resolved element layout, copyability, and ownership capabilities.
  • Every built-in integer executes through locals, parameters, calls, returns, aggregate fields, fixed arrays, slices, Vec<T>, optional and fallible outcomes, arithmetic, comparison, shifts, lossless conversions, and interpolation. Imported nested aliases retain their concrete integer capability through lowering.
  • Boundary tests cover signed minima, narrow and wide overflow, division failure, signed division overflow, shift bounds, widening, aggregate memory widths, owned iteration, and formatter output.
  • development/compiler/scripts/verify.sh passed all 3,398 tests, formatting, and warnings-denied Clippy. Documentation generation produced 107 pages; git diff --check also passed.