Incan 0.3
Incan 0.3 is the release where the 0.2 foundation starts to feel like a practical application platform. The 0.2 line made namespaces, library manifests, and Rust boundaries more explicit; 0.3 builds on that by adding richer source-level language features, a much broader standard library, stronger testing and formatting workflows, and a lot of hardening around generated Rust, package boundaries, decorators, aliases, vocab surfaces, and ownership planning.
The headline is not just “more syntax.” The release moves common project patterns into documented language and stdlib surfaces so users can write less Rust-shaped scaffolding, while compiler behavior increasingly flows through shared metadata and argument-planning paths instead of local special cases.
Highlights
- Richer language surface: exact numeric widths, fixed-scale decimal annotations, loop expressions,
if let/while let, union narrowing, pattern alternation, value enums, enum methods, computed properties, decorators, aliases, partial callable presets, generators, iterator adapters,Resultcombinators, and explicit type-token overloads such ascast(expr, int). - Broader standard library:
std.collections,OrdinalMap,std.graph,std.json,std.regex,std.datetime,std.logging,std.telemetry,std.fs,std.io,std.tempfile,std.uuid,std.encoding,std.hash,std.compression,std.result,std.async, andstd.testing. - Stronger Rust interop: Rust trait adoption from Incan source, associated types, derived and inspected Rust metadata, keyword arguments for inspected Rust calls, raw identifier field access, generated-Rust lint suppression, better Rust callable alias handling, and closure context for Rust callback APIs.
- Better package and metadata behavior: public aliases, partial presets, decorator-backed metadata, facade reexports, checked API projections, public dependency-owned unions, and package-boundary call surfaces now behave much closer to ordinary local source.
- Vocab and DSL support: scoped DSL surfaces now support expression-position declarations, helper calls, leading-dot references, expression-list metadata, compound clauses, query-block-style brace forms, and dependency-provided vocab activation in tests and formatting.
- Testing and tooling improvements:
incan testsupports inlinemodule tests:workflows, fixtures, parametrization, markers, resource-aware parallelism, JSON Lines, JUnit XML, shuffling, durations, and cleaner batch isolation.incan fmt,incan lock, lifecycle commands, checked API metadata, generated references, docs builds, and install actions are also more release-ready. - Compiler hardening: ownership/coercion emission now goes through a shared argument-use plan, duckborrowing covers more real call sites, union wrapper identity is preserved more consistently, decorated defaults survive imports and reexports, and formatter/parser paths share more context across ordinary source, packages, tests, and vocab blocks.
Migration notes
Most ordinary 0.2 programs should continue to compile. The main adoption notes are:
- Expect one intentional formatter pass.
incan fmtnow follows the 0.3 vertical-spacing and fluent-chain style more consistently, including vocab/query block preservation. - Numeric vocabulary is broader. Existing
intandfloatcode keeps working, but local names such asdecimal,numeric,bigint,integer,smallint,real, ordoublemay now collide with canonical numeric forms. - Testing helpers should be imported explicitly from
std.testing; the languageassertstatement remains always available. - Lockfiles are less noisy. Routine
build/testruns reuse stale lock payloads instead of rewriting committed lockfiles; runincan lockwhen you intentionally refresh the lock. - Most new language features are additive. Existing
match,while True, helper-function, and nested-matchcode does not need to be rewritten immediately.
Known limitations
- Decimal arithmetic is not yet general language behavior. The 0.3 decimal surface covers typed annotations, literal validation, formatting, generated Rust representation, and display.
incan fmtis much more capable, but still conservative rather than a complete pretty-printer overhaul for every nested expression shape.std.regexis a safe-default regular-expression surface, not a Python/PCRE compatibility layer. Lookaround, pattern backreferences, and other backtracking-only features are tracked separately for a futurestd.resurface.- Native Windows filesystem behavior is not part of the 0.3 contract.
std.fsdocuments Unix-like host behavior until the stdlib has an explicit platform split.
Docs
Start here for the full release notes and migration detail:
Useful entry points:
- Control flow: https://incan.io/v0.3/language/explanation/control_flow/
- Numeric types: https://incan.io/v0.3/language/how-to/choosing_numeric_types/
- Testing in Incan: https://incan.io/v0.3/language/how-to/testing_stdlib/
- Standard library reference: https://incan.io/v0.3/language/reference/stdlib/
- Rust interop: https://incan.io/v0.3/language/how-to/rust_interop/