Skip to content

Reference

The Reference section specifies the Incan Programming Language: its grammar, types, semantics, standard library APIs, and runtime behavior. Each page states the contract of one surface: its forms, rules, types, signatures, defaults, and refusals with their codes.

For step-by-step learning and patterns, see Tutorials and the How-to guides. For practical examples, see the repo’s examples/ directory.

Table of contents

  • Language reference (generated): compiler-generated tables (keywords, operators, builtins, etc.)
  • Feature inventory (generated): generated capability atlas for syntax, stdlib, interop, testing, async, tooling, and library surfaces
  • Code style guide: layout, spacing, and readability rules for .incn source
  • Assignments: bindings, reassignment, tuple unpacking, tuple assignment, and chained assignment
  • Functions and calls: function signatures and function types, mut parameters, ordinary call binding, rest parameters, call-site unpacking, and collection literal spread
  • Computed properties: field-like derived members, their declaration and reads, and trait requirements
  • Newtypes: nominal wrappers, validated construction, implicit coercion sites, and constraints
  • Generators: Generator[T], yield, generator expressions, and generator methods
  • Symbol aliases: top-level, method and enum variant aliases, and importing and re-exporting them
  • Callable presets: top-level, method and local partial presets, their targets, signatures and preset values, and their refusals
  • Conditional compilation: when feature("name"): blocks, their grammar, what they may condition, and their restrictions
  • Glossary: the terms the docs use
  • File I/O: the std.fs file and path surface
  • Imports and modules: import forms, module paths, bindings, exports and re-exports, package namespaces, and Rust crate imports
  • Static storage: static, pub static, initialization rules, and live shared module state
  • Frozen collections: the FrozenList, FrozenSet and FrozenDict types a const holds, and their reads
  • Match patterns: the patterns of match, if let, and while let, and when the arms of a match cover its subject
  • Project lifecycle: project roots, loaf.toml metadata, version bumps, and named environments
  • Reflection: reflection helpers of models and classes
  • std.testing: assertions, markers, fixtures, and parametrization
  • Standard library reference: signatures for std.* modules (std.math, std.async, std.collections, ...)
  • Numeric semantics: numeric types and aliases, literals, assignment between numeric types, resizing methods, operators, and compound assignment
  • Strings: string types, formatting, and string operations
  • Union types: anonymous closed unions, A | B, narrowing, and match type patterns
  • Derives & traits: derives, trait authoring, method decorators, and generic instance methods
  • Stdlib traits: the standard library's protocol traits (iteration, indexing, operators, conversions, and others)
  • Derives: