Status icons
| Status | Meaning | |
|---|---|---|
| Done | Complete for current scope. Report gaps as bugs. | |
| In progress | Actively being implemented toward the done bar. | |
| Experimental | Exists in some form; not at the done bar yet. | |
| Planned | On the roadmap; not delivered yet. | |
| Omitted | Deliberately excluded from the language design. |
Language and types
| Status | Feature | Notes |
|---|---|---|
| Shapes and constraints | Structural types and built-in constraints; compile-time checks where values are static, runtime validation via ensure in the body. Parameter prologue emission is future work. | |
ensure, is, and shape guards | Runtime checks tied to types; shape refinement on records. Successor narrowing after ensure works for simple identifiers; compound paths still open. Bare bool subjects get an is True() hint. | |
| Nil and presence checks | ensure x is Nil(), ensure !x, and *T .Present() / .Nil() on pointers. Not full optional value types yet. | |
| Type guards | Domain predicates with is (subject T) Name { … }; narrowing polish still open. Design locked in the refinements RFC series (accepted decision, stability, type targets). | |
| Result and nominal errors | Result(S, F), error X { … }, and ensure / if x is Ok() narrowing. Closed nominal error unions (ParseError | IoError) emit sealed Go interfaces. Failure keyword is else (not or). Failure-type and export rules still maturing. | |
| Control-flow narrowing | If-branch refinement works; ensure-successor narrowing for simple identifiers works; compound paths and join across branches still open. | |
| Type aliases | Simple type Name = BaseType works end-to-end; same-package aliases can match sibling Go structs. Broader alias semantics still evolving. | |
Binary types (A | B, A & B) | Union and intersection typedefs type-check; closed nominal error unions emit to Go and TS. General unions, intersections, and narrowing still incomplete. | |
Optional types (T | Nil) | Planned: Crystal-style T | Nil / T? unions, narrowing, and Go lowering. See optionals RFC. | |
| User-defined generics | Type parameters on types and functions. | |
Postfix ++ / -- and compound assignment | +=, -=, *=, /=, %=, &=, |= as standalone statements and in for post clauses (lang_probe/59_inc_compound). | |
| Shift / xor compound assignment | ^=, <<=, >>=, &^= and bitwise operators (^, <<, >>, &, |, &^), including byte with Int. Hex / octal / binary integer literals keep their spelling under forst fmt. | |
switch / case / default / fallthrough | Go-faithful tag and boolean switch, including fallthrough. Type switches (switch v := x.(type)) are omitted; use is narrowing instead. | |
Labeled break / continue and goto | Labeled loop control and goto label with Go spec jump rules. | |
const / iota | Top-level const (single and grouped) with Go iota semantics. | |
select | Not a Forst keyword yet; blocked on channel support. | |
| Slice subslice expressions | xs[low:high], xs[low:], xs[:high] on Forst []T values. |
Go interoperability
| Status | Feature | Notes |
|---|---|---|
| Transpile to Go | Packages, types, and functions emit as readable Go for go build. | |
| Validation from constraints | Compiler emits runtime checks from type constraints. | |
Providers (use / with) | Transitive obligation chains, Go lowering, and cross-package fixed-point (emit-time shims, no committed Go stubs). RFC GA gaps (LSP polish, discovery JSON, sidecar host patterns) remain. | |
| Import and type-check Go packages | go/packages loading and Forst↔Go call checking; common stdlib paths work. Forst func literals assign to concrete Go func parameters. Interface fields accept concrete handlers (e.g. ServeMux into http.Server.Handler). Crypto hash / HMAC constructors type-check as function values. Forst sibling imports resolve from .ft in the same module. Failed loads surface as go-import diagnostics. | |
| Named Go types in Forst signatures | Imported Go named types (e.g. os.File, exec.Cmd) map to qualified Forst type names and emit as Go selectors. new(imported.T), &imported.T{…}, and methods after construction work. | |
| Go composite types (maps, channels, arrays, funcs) | map[K]V, [N]T, chan T, and func types map at the boundary. Exported-field anonymous structs map to Forst shapes. Some Go type-alias identity gaps remain. | |
| Variadic spread into Go calls | argv[1:]... at Go call sites. | |
| Fields and methods on Go values | Dotted chains on Go-typed bindings (e.g. cmd.ProcessState.ExitCode()). | |
Mixed .ft and .go modules | Adopt beside hand-written Go in one module tree. Same-package unexported symbols resolve when .go is co-located. forst test includes sibling Go; forst run/watch can emit beside the package when generate.go is set. | |
| Generic Go API consumption | slices.Contains, maps.Clone, and similar APIs instantiate at call sites via type inference. | |
| Selectable Go emit target version | Emit for go toolchains older than the compiler’s own version. |
Node interoperability
| Status | Feature | Notes |
|---|---|---|
forst generate → @forst/gen | Linked client package under .forst/client; subpath imports per Forst package; shared ftconfig discovery with forst dev. | |
| Provider-free client surface | TS emit and invoke wire stay data-only; functions with unsatisfied Providers(f) are omitted from exports. | |
forst dev HTTP API | /health, /functions, /invoke, /types, /version for local iteration; regenerate client on .ft save. | |
| Tagged invoke failures | Stable JSON POST /invoke plus _tag failures, .safe(), and per-call options. | |
Built-in HTTP server + @forst/gen | In-process /invoke in compiled Go binaries; generated subpath exports. Pin in production. | |
@forst/sidecar and @forst/cli | npm packages; watch reload, watchGenerate, and version checks. Pin in production. | |
| Testing and Effect mode | withForstTestScope, optional generate.effect / ForstClientLive. | |
| Protobuf sidecar wire | gRPC / Connect as a future high-throughput alternative to JSON. | |
| Native ES modules / Node addon | Forst → Go → addon → ESM path; design exploration only. |
Tooling
| Status | Feature | Notes |
|---|---|---|
forst lsp | Diagnostics, hover, completion, definition, references, rename, symbols, folding. Unary & hovers as address-of when disambiguated from bitwise AND. | |
| LSP Go interop hover | Godoc and go/types signatures for qualified imports; module-level typecheck for cross-package Forst siblings. Go pkg. completion not yet. | |
| LSP formatting and code lens | Format document advertised; code lens and some code actions still minimal. | |
| VS Code extension | Marketplace + Open VSX publish on vscode-forst-v* releases. Finds go when the GUI PATH is thin (forst.go.path optional). | |
forst test | Discover Test* in *_test.ft, emit Go tests and cross-package shims, run go test. Walks every package path; sandboxes include sibling .go. Primary use: Providers wiring, mixed packages, and cross-package integration. | |
CLI (run, build, generate, dev, lsp, test, fmt) | Core compiler commands via native binary or @forst/cli. | |
| Generate plugins | forst generate runs configured emitters on a typechecked snapshot (JSON Schema, oRPC, file routes, React Router). Protocol and official binaries are usable; they may change. Pin the compiler. | |
| Error message quality | Incremental improvements; diagnostics still vary by code path. |
Infrastructure
| Status | Feature | Notes |
|---|---|---|
| CI pipeline | GitHub Actions: coverage (task ci:test), E2E (task ci:e2e), compiler build. | |
| Release automation | release-please, git tags, npm/JSR publish workflows. | |
| Test coverage gate | Colocated Go tests and merged-statement coverage targets still expanding. |
Docs
| Status | Feature | Notes |
|---|---|---|
| This docs site (Mintlify) | Quickstart, language guides, interop, and workflow pages. Broader tutorials and migration guides still open. | |
| Contributing guide | Doc contribution notes exist; full dev-setup CONTRIBUTING.md still planned. |
What Forst omits
These are deliberate anti-features—not backlog gaps. Forst excludes them when they would hide control flow, surprise with errors, or break compile-time reasoning.| Status | Topic | Notes |
|---|---|---|
panic / recover as language constructs | Non-local, implicit control flow. Forst steers toward explicit Result and Go error returns. Generated Go or third-party code may still panic. | |
Exceptions (try / catch / throw) | Stack-unwinding surprises. Aligns with Go (T, error) and Result(S, F) instead of TS/Java-style exceptions. | |
| Class hierarchies and deep inheritance | Inheritance obscures which fields an API has. Forst favors structural shapes and function-centric APIs. | |
| Macros and preprocessors | Control-flow changes must use ordinary keywords, not compile-time rewrites that hide behavior. | |
| Runtime reflection for wiring | Providers, constraints, and obligation tracking are compile-time—not discovered via introspection at runtime. | |
TypeScript-style undefined | No dual null/undefined universe. Optionals direction is Nil and absence—see optionals RFC. | |
| Implicit numeric widening | Silent int↔float (and similar) conversions are rejected; casts stay explicit. | |
| Dependent types and type-level computation | No type families or template metaprogramming—keeps typechecking decidable and tooling fast. | |
| Runtime type mutation | No monkey patching; type definitions are fixed at compile time. | |
ensure-scoped immutability | Rejected: mutation drops refinement facts instead of locking fields. No borrow checker; Go stays untrusted. |
Full roadmap
ROADMAP.md on GitHub
Feature parity tables, experimental gaps, RFC links, and infrastructure status.