Nocter Language Specification
This directory is the authoritative source for Nocter language behavior. It is written for Nocter users, standard-library authors, editor/tool authors, and AI assistants that need to generate or analyze Nocter source.
The detailed specification is split by topic so each design area can evolve without turning this file into a monolith.
Nocter is a statically typed, value-centered, module-oriented, low-dependency systems language. Its compiler is intended to produce native executables directly, without requiring an external assembler, linker, runtime library, or platform SDK for normal users. Nocter values simplicity, encapsulation, and foolproof design. It also treats AI readability and writability as a tooling goal: the language keeps one canonical style, machine-readable diagnostics, and an example corpus instead of adding multiple alternate spellings.
Chapters
- Design Principles
- Overview
- Nocter v0 Contract
- Modules and Use Declarations
- Values and Types
- Control Flow
- Errors and Optionals
- Ownership, Borrowing, and Drop
- Memory, Regions, and Allocators
- Strings, Arrays, Views, and Pointers
- Generics, Interfaces, Embedding, and Methods
- ABI and Layout
- Targets and Distribution
- Standard Library, Primitives, and OS
- Diagnostics
- Lexical Grammar
- Tooling and Editor Integration
- Command Line Interface
- Source Style and Formatting
- Future Literal Definitions and Spread
Supporting Material
Editing Policy
- Keep this file as the table of contents and high-level specification entry point.
- Put normative language and public standard-library rules in the relevant
spec/*.mdchapter. - Keep examples close to the rule they explain.
- Keep
guides/ai.mdcompact and example-oriented; do not let it replace normative specification chapters. - When a design is still provisional, mark it explicitly in that chapter instead of hiding uncertainty in broad wording.
- Keep compiler implementation status, backend work plans, and handoff notes in
../development/.