# EX Script — Development Roadmap

Status legend: **DONE** = implemented, tested, and working in this repository.
PLANNED = designed (documented above), not yet implemented. The language
policy: never claim a feature is done until it runs.

## Prototype (this repository) — DONE

Language core:

- [x] Lexer, parser, AST with spans
- [x] Type checker: inference, optionality, results, unions, structural typing,
      generics, narrowing, exhaustiveness, mutability
- [x] Rich diagnostics: code frames, why, fixes
- [x] Codegen to readable JS + support runtime (`$ex`)
- [x] Module system: `std.*`, relative imports, `js:` imports; graph loader
      with cycle detection (`src/compiler/modules.ts`)
- [x] `schema` → static type + runtime validator, `parse`/`from`
- [x] Error model: `!`, `?`, `raise`, `Ok`/`Err`, `try/catch` boundary
- [x] Optionals: `or`, `if let`, `?.`, `or raise`
- [x] `async fun`, `await`, `all`/`race`/`timeout` (checker + codegen; not yet
      exercised end-to-end in the fixture suite)
- [x] Testing: `test` blocks, `expect` matchers, `ex test`
- [x] CLI: `run`, `build`, `test`, `check`, `help`, `version`
- [x] Standard library (native): `std.io`, `std.string`, `std.collections`,
      `std.math`, `std.test`
- [x] Examples: `examples/hello` (multi-module, manifest, tests, CLI args),
      verified end-to-end through the CLI

## Alpha (next)

- [ ] `ex fmt` — deterministic, idempotent formatter (design in docs/08)
- [ ] `ex lint` — `unused-var`, `unused-import`, `prefer-immutable`,
      `no-dynamic`, `no-throw`, `no-null`, `no-assert`, `shadowing`, `todo`
- [ ] `ex init`, `ex explain`, `ex info`
- [ ] Stdlib: `json`, `time`, `env`, `process`, `log`, `cli`
- [ ] Packages: manifest deps, semver ranges, lockfile, `deps/` resolution,
      `ex install`/`ex add`
- [ ] Migration: TS → EX converter with report and diagnostics
- [ ] `ex lsp` — language server (completion, hover, go-to-def, diagnostics,
      rename, code actions that apply the "Possible fixes" suggestions)
- [ ] Source maps + `ex debug` (Node inspector integration)
- [ ] `ex watch` — incremental watch mode
- [ ] Registry: public index + `ex publish`, `ex audit`, `ex tree`
- [ ] Property-based tests + snapshot testing in `ex test`
- [ ] `--coverage` (V8 coverage integration)
- [ ] TSX migration (JSX → EX template syntax)
- [ ] Structured concurrency task scopes (cancellation of child scopes)
- [ ] `ex bench` — benchmark runner

## Beta

- [ ] Compile-time evaluation (`const` folding across modules, `#if`)
- [ ] Macro/metaprogramming system (compile-time functions over the AST)
- [ ] `ex doc` full pipeline (API pages, search, source links)
- [ ] Incremental checking server (shared memory cache)
- [ ] Self-host: reimplement the lexer/parser/checker in EX Script
- [ ] `ex fmt`/`ex lint` plugin-safe rule API (still zero-config default)
- [ ] Decorators/operator overloading — *only if* the design review shows a
      clear win (Language Design Rule)

## Stable

- [ ] 1.0: semantics frozen, type-table format frozen, lockfile format frozen
- [ ] Performance: incremental < 50 ms, cold 10k-line check < 1 s
- [ ] WASM/native backend evaluation (compiled via a lower IR)
- [ ] Editor integrations (VS Code, Neovim) via `ex lsp`
- [ ] Large-scale migration guides + ecosystem packages

## Roadmap principles

1. **Nothing is DONE until it runs in the test suite.** No placeholder features.
2. **The design docs are the spec.** Implementation changes the docs, not the
   other way around; when they diverge, the divergence is a bug in one of them.
3. **Stability before features.** The type table and lockfile formats freeze
   before new language features land.
4. **Self-hosting is the quality bar.** The compiler will be rewritten in EX
   Script once the language can express it — the truest test of a language
   designed to be "production-ready, not a toy".