writeonce/docs/stories/language-runtime-database
shoney.arickathil d719917330 docs: iteration 13 story -- compile-time metaprogramming (derive)
- captures the toCSV/reflection thread: principle 13 forbids runtime
  reflection, so a generic serializer can't be a user-written function;
  Rust answers with derive macros (compile-time codegen), and
  json.encode is already a single hand-built instance of exactly that
- iteration generalizes json.encode's mechanism into a reusable derive
  facility: @derive(Json/Csv/Eq/Hash/Show) -> the compiler generates
  per-type routines from the class-table metadata it already emits,
  monomorphic, no runtime type tag, no dynamic dispatch
- closes the query-result-serialization gap
  (csv.encode(from e in Employee ... select e)) that has no expression
  today; acceptance requires json.encode retrofitted onto the framework
  with byte-identical output, and disassembly proving no reflection
- four forks: request surface (lean @derive annotation), invocation
  (lean compiler-recognized encode builtins, no UFCS/methods), Eq/Hash
  sharing the engine's key comparison, static applicability checking
- out of scope: full trait/typeclass system, user proc-macros, general
  generics, cross-channel derive -- a CLOSED compiler-known derivable
  set, the pragmatic 80% without the type-system weight
- numbered 13 to echo the principle it lives inside; roadmap + board
  rows added

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-16 04:57:00 +02:00
..
00-story.md docs: iteration 13 story -- compile-time metaprogramming (derive) 2026-08-16 04:57:00 +02:00
01-principles-doc.md language-runtime-database iterations 2026-08-07 19:36:49 +02:00
02-vm-core.md language-runtime-database iterations 2026-08-07 19:36:49 +02:00
03-compiler-front.md docs: compiler front-end specifications and plans (Tasks 2-6) 2026-08-10 09:11:04 +02:00
04-single-binary-e2e.md language-runtime-database iterations 2026-08-07 19:36:49 +02:00
05-language-surface.md docs: reprioritise to log-watcher-executable only; update stories and plans 2026-08-14 22:16:14 +02:00
06-program-mode-stdlib.md docs: reprioritise to log-watcher-executable only; update stories and plans 2026-08-14 22:16:14 +02:00
07-logwatcher-proof.md docs: reprioritise to log-watcher-executable only; update stories and plans 2026-08-14 22:16:14 +02:00
07b-inferred-gc-mark-sweep.md docs: performance arc as story iterations (9e measure, 9f io_uring) 2026-08-15 22:12:48 +02:00
08-shard-actor-runtime.md docs: performance arc as story iterations (9e measure, 9f io_uring) 2026-08-15 22:12:48 +02:00
09-database-engine.md docs: borrow/GC analysis for the database engine, into the iterations 2026-08-15 09:57:53 +02:00
09b-table-relations-query.md docs: borrow/GC analysis for the database engine, into the iterations 2026-08-15 09:57:53 +02:00
09c-cross-program-tables.md docs: employee-list sample -- program B's manifest pair (9c/9d target) 2026-08-15 12:34:19 +02:00
09d-keypair-attach-auth.md docs: employee-list sample -- program B's manifest pair (9c/9d target) 2026-08-15 12:34:19 +02:00
09e-durability-throughput-scale.md docs: performance arc as story iterations (9e measure, 9f io_uring) 2026-08-15 22:12:48 +02:00
09f-io-uring-commit.md docs: performance arc as story iterations (9e measure, 9f io_uring) 2026-08-15 22:12:48 +02:00
10-http-service.md language-runtime-database iterations 2026-08-07 19:36:49 +02:00
11-fibers.md docs: story iterations 11-12 (fibers, blue-green deploy) 2026-08-10 09:58:52 +02:00
12-blue-green-deploy.md docs: story iterations 11-12 (fibers, blue-green deploy) 2026-08-10 09:58:52 +02:00
13-compile-time-metaprogramming.md docs: iteration 13 story -- compile-time metaprogramming (derive) 2026-08-16 04:57:00 +02:00