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
.incnsource - Assignments: bindings, reassignment, tuple unpacking, tuple assignment, and chained assignment
- Functions and calls: function signatures and function types,
mutparameters, 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
partialpresets, 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.fsfile 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,FrozenSetandFrozenDicttypes aconstholds, and their reads - Match patterns: the patterns of
match,if let, andwhile let, and when the arms of amatchcover its subject - Project lifecycle: project roots,
loaf.tomlmetadata, 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, andmatchtype 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:
- String representation:
Debug,Display - Comparison:
Eq,Ord,Hash - Copying/default:
Clone,Copy,Default - Serialization:
json,Serialize,Deserialize - Validation:
Validate - Custom behavior: overriding derived behavior
- String representation: