Programming Language

Nocter

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

/development/reviews/v0.23.0-phase-2.md

v0.23.0 Phase 2 Type-Owned Integer API Review

Status: complete (2026-08-31). This review covers the destructive public API transition. Full boundary and allocator qualification remains Phase 3 work.

Public Surface

std/num/index.nct is the sole public contract authority. Each of the ten built-in integer types owns one parse, one to_string, and one allocator-explicit try_to_string declaration. The existing u8.checked, u8.truncate, and u64 mixing members remain in their same consolidated type blocks. No free-function alias or deprecated wrapper remains.

The contract contains documentation and no method body. Parsing bodies live in decimal.nct, owned-storage adapters live in text.nct, primitive conversion and mixing bodies remain in scalar.nct, and public-surface tests live in tests.nct. Reciprocal see edges grant only direct source visibility and do not create another module or public name.

Authority and Dependency Review

  • Every parse entry delegates immediately to one signed or unsigned full-width scan, then performs at most one destination range check. No destination body copies lexical rules.
  • Every String entry calls the matching std/fmt.try_append_* contract. std/num owns allocation and std/fmt owns spelling; neither reads the other's representation.
  • Exact maximum output capacities are local adapter policy, not formatter grammar. Ordinary and recoverable methods differ only in allocation-failure policy.
  • Public from allocator contracts and implementation bodies match exactly. Result provenance is checked by the ordinary declaration contract rather than inferred by an editor-only rule.

Migration and Tooling Evidence

The complete repository search finds no removed callable name in standard source, examples, or compiler fixtures. file-summary, line-frequency, text-report, and text-search check against an isolated current compiler home using receiver-owned usize.to_string calls.

The standard-library discovery and contract audit passes all 19 tests. Semantic checking passes all 480 focused tests. The dedicated native numeric target executes four standard tests, including all ten type-owned parse and String surfaces. The language-server normalized-presentation test shows pub func i8.parse(text: &str): i8? and pub method i8.to_string(): String from the real contract source.

No compatibility layer, duplicate formatter, source-text editor inference, or public unchecked conversion was introduced. Phase 3 must still prove every adjacent numeric boundary, malformed grammar class, recoverable allocator path, native round trip, and full workspace gate.