The README says what the collector touches, and what a dyn is

This commit is contained in:
Joseph Ferano 2026-09-21 19:15:34 +07:00
parent 612411021c
commit bcfcf130f7

View File

@ -10,7 +10,7 @@
Flan is an experimental, ahead-of-time compiled Lisp for programs that need
predictable memory use and a fast edit–run loop. It combines S-expressions,
static types, explicit ownership, and a development session that can replace a
static types, explicit allocation, and a development session that can replace a
function in a running program without resetting its state.
It is being built around games, but the interesting part is broader: a compiled
@ -18,22 +18,28 @@ language where the running program remains available for inspection,
experimentation, and small changes.
In practical terms: you get parentheses, a debugger that would like to have a
conversation, and no garbage collector quietly choosing the dramatic moment to
join your frame loop.
conversation, and a collector that only ever touches values you asked to be
dynamic.
## What it has
- Native compilation through LLVM, plus an in-progress direct x86-64 backend.
- C-like data layout: structs, fixed arrays, pointers, slices, and explicit
allocation. There is no garbage collector.
- Owned `Vec` and `Map` containers, plus checked moves and borrowing-oriented
slice operations.
allocation.
- `Vec` and `Map` containers that take the allocator they are to use, plus
slices as the non-owning view of them.
- Generics, algebraic unions, enums, macros, packages, `defer`, and a C FFI.
- Conditions and restarts for recoverable failures and interactive debugging.
- A raylib package and a collection of ported raylib examples.
- Native, WASI, and web build targets. The cross targets are useful but less
complete than the native development workflow.
There is also a `dyn` type: one machine word whose contents the runtime knows
and the type checker does not. Writing `dyn` is how a value opts in to being
dynamic, and those values — and only those — live on a collected heap. A
program that writes it nowhere pays nothing for it, and `--no-gc` is how to
have that checked: it names every `dyn` in the program and refuses to build.
The project is exploratory software, not a stable language release. Some
features are deliberately refused while their semantics are still undecided;
the compiler aims to say why rather than quietly accepting a partial version.