Repository navigation
FAQ
No — and it doesn't claim to be. Tycho is an experimental proof-of-concept for one idea: implicit hierarchical arenas under value semantics. It is heavily tested for its age (every example built native and sanitized against a golden, a differential fuzzer, eight full programs run with zero compiler or runtime defects — see the repository README), but "experimental" is a scope statement, not a modesty tic: it has no security audit, no stability guarantees, and no package ecosystem. Use it to learn, to experiment, and to test the idea — not for anything where a compromise would matter. The security policy says the same, in blunter words.
There is no reference type, so a dangling pointer is inexpressible — the bug
that escape analysis exists to prevent can't be written. Memory frees per scope;
values that outlive their scope are copied up. Option removes null, Result
removes exceptions, indexing is bounds-checked, and copy-in/copy-out
concurrency removes data races inside Tycho (concurrent FFI calls can still
race). Every test runs under ASan + UBSan, plus LeakSanitizer and
ThreadSanitizer.
No shared mutable references: you can't build a shared-mutable graph,
doubly-linked list, or observer the pointer way — the idiom is a flat node pool
(all nodes in one array, linked by integer index), which is also the
cache-friendly layout data-oriented engines choose on purpose. Pointer-shaped
data costs more, measured: a recursive trie ~1.55× C's memory, a fixed-capacity
LRU ~2.8×; the flat-pool idiom brings the graph analog to ~1.3× C. Arenas
reclaim at scope exit, not incrementally. The full loss column is in
docs/internals/value-semantics-limits.md.
"Copied on assignment" is the semantic model, not the generated code. The
transpiler drops the copy wherever a value is provably un-aliased — returns
build in the caller's arena, acc = acc + x grows in place, b := a becomes a
move when a is dead. A copy happens only when a value genuinely escapes to two
live owners — exactly when a GC or refcount would also work. Measured, not
asserted: see Performance in this wiki.
There isn't one, on purpose. A package is a directory of .ty files you import
by path; the corelib lives under core:. Adding third-party code is a
deliberate manual act — vendor the source — never a one-line command that pulls
a transitive graph you've never read.
The Contributing page has the full answer; the short version:
file an issue with a small .ty program that reproduces it, plus what you
expected vs. what happened. A miscompile that a fixture in tests/ would have
caught is gold — it shows where the fuzzer and suite have a blind spot.
The reader docs here are mirrored from /docs in the repo — the canonical source. · tycho-lang.com · MIT licensed
- Tutorial
- The Tycho thesis: value semantics makes implicit arenas work
- Architecture & project status
- From
mallocto implicit arenas
- Tycho language reference
- Basics
- Types
- Functions and closures
- Structs and tuples
- Enums, options, and
match - Arrays and slices
- Subscripts (user-defined projections)
- Maps
- Generics
- Concurrency
- FFI (calling C)
- Packages
- Builtins
- Memory model in the self-hosted compiler
- Tycho aggregates: arrays & structs under value semantics
- Maps with arbitrary value types
m[k]as a place: in-place map-value mutation- Generics (monomorphized)
- Concurrency in Tycho
- FFI — calling C from Tycho
- Packages & modules
- corelib — Tycho's standard library
- Performance: the self-hosted transpiler vs the C one
- Debugging generated C