Skip to content

Commit 7fed45c

Browse files
olwangclaude
andcommitted
docs: add spec-todo.md — prioritized unimplemented spec surface
Capture the §3.2 (review-visible-not-executable) + §20.1 (deferred) items the spec documents but doesn't implement, ranked P1/P2/P3 with §refs, rationale, and effort. Linked from the docs index. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5ea58db commit 7fed45c

2 files changed

Lines changed: 78 additions & 0 deletions

File tree

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ LLMs); everything else lives here.
1414
| [ARCHITECTURE.md](ARCHITECTURE.md) | Module boundaries of the checker/lowering implementation. |
1515
| [DEVELOPMENT.md](DEVELOPMENT.md) | Local verification flow and development discipline. |
1616
| [DOCKER.md](DOCKER.md) | Containerized, cross-platform dev environment (Docker / VS Code / Codespaces). |
17+
| [spec-todo.md](spec-todo.md) | Prioritized list of unimplemented spec surface (the §3.2 / §20.1 superset). |
1718

1819
## Implementation-planning specs (not yet normative)
1920

docs/spec-todo.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# RSScript language-spec TODO
2+
3+
Unimplemented surface of the language spec (`RSScript_v0.7_Spec.md`), prioritized.
4+
5+
The spec is a deliberate **superset** of the implementation, in three tiers:
6+
7+
1. **Executable MVP (§3.1)** — implemented and tested at VM↔compiled parity.
8+
2. **Review-visible but not executable (§3.2)** — parsed and surfaced for review,
9+
but rejected before lowering with stable diagnostics (verified: `spawn`
10+
`RS0015`/`RS0101`, `await`-in-argument → `RS0411`). This file tracks these.
11+
3. **Post-v0.7 deferred directions (§20.1)** — future work (items J/K/L are
12+
already done).
13+
14+
Priority = value to real programs / the active tinygrad port + dogfooding,
15+
weighed against effort. Priorities are a recommendation; re-rank against the
16+
actual driver (see "Basis" at the bottom).
17+
18+
## P1 — highest leverage (unblocks real code / dev loop)
19+
20+
- [ ] **`await` in expression position** (§3.2, §20.1-A) — _effort: medium._
21+
The one *executable* gap: `f(x: await g())` is rejected (`RS0411`); `await` only
22+
works at statement boundaries and in `if`/`loop`/`match`/`with` bodies.
23+
Approach: an await-hoisting (A-normal-form) desugar that lifts a nested await to
24+
a preceding `let __rss_await_N = await <op>` — producing the linear awaits both
25+
backends already lower. Keep it sound: don't hoist across short-circuit
26+
(`&&`/`||`) RHS, `match`/`if` arms, or closure bodies. Verify at VM↔compiled
27+
parity.
28+
29+
- [ ] **Structured-fix tooling + analysis server** (§20.1-D) — _effort: medium–large._
30+
`rss fix` applying machine-applicable structured fixes (the `Fix`/applicability
31+
infrastructure already exists on diagnostics), and a language/analysis server
32+
streaming diagnostics + fixes (build on the existing `lsp` crate). Biggest
33+
dev-experience multiplier; helps every user and the port edit→check loop.
34+
`rss fix` is the bounded sub-part; the full LSP is the larger half.
35+
36+
- [ ] **FFI / native-ABI adapter contracts** (§3.2 general FFI, §20.1-N) —
37+
_effort: medium–large, open-ended._
38+
`native fn` declares external boundaries today; the gap is binding *whole*
39+
runtime/autogen/device boundaries compactly without large wrapper files, plus
40+
ABI-adapter conformance facts. Needs a concrete target boundary to scope "done."
41+
42+
## P2 — real features, not blocking today
43+
44+
- [ ] **Capability objects / explicit dynamic dispatch** (§3.2, §20.1-G) —
45+
_large._ Protocol-typed values / open dispatch; today only static `impl` +
46+
generic bounds.
47+
- [ ] **`Stream<T>` + `await for` async sequences** (§20.1-H) — _medium–large._
48+
Async iteration; `rss-async` has the base. Pairs with extended async (A).
49+
- [ ] **Scoped views / slices** (zero-copy borrowed regions) (§3.2, §20.1-I) —
50+
_large._ Perf + ergonomics; pairs with the parked lazy-`Iter` note in `TODO.md`.
51+
- [ ] **Sum-type hardening** (§20.1-E) — _small–medium._ Incremental tightening of
52+
the shipped sum surface.
53+
- [ ] **Module visibility / re-export hardening** (§20.1-M) — _small–medium._
54+
Refines the module system (aliasing/qualified/glob already shipped).
55+
56+
## P3 — deferred by design / lower value
57+
58+
- [ ] **`spawn` + public task handles** (§3.2) — _large._ Single-isolate
59+
cooperative model is the deliberate v0.7 stance; unstructured `spawn` is
60+
intentionally rejected for now.
61+
- [ ] **Cross-isolate message API (zero-copy transfer)** (§20.1-B) — _large._
62+
Only after the async/isolate model matures.
63+
- [ ] **Two-tier execution (dev interpreter + AOT)** (§20.1-C) — _large._ reg-VM +
64+
compiled already run at parity; this is an optimization, not a new capability.
65+
- [ ] **Rust-style open-enum machinery** (§3.2) — counter to the sealed-sums
66+
design; likely stays a non-goal.
67+
- [ ] **Registry-level review-risk badges** (§20.1-F) — _small–medium._ Registry
68+
polish.
69+
70+
## Basis for the ranking
71+
72+
- **tinygrad port driver:** P1 FFI + `await`-in-expression matter most; capability
73+
objects (P2) next if the port hits protocol-typed dispatch.
74+
- **dogfooding / self-host driver:** the analysis server / `rss fix` (P1-D) is the
75+
biggest force-multiplier.
76+
- **perf driver:** scoped views/slices (P2-I) + the parked lazy-`Iter` (`TODO.md`)
77+
move up to P1.

0 commit comments

Comments
 (0)