- 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> |
||
|---|---|---|
| .. | ||
| examples | ||
| future-scope | ||
| plan | ||
| runtime | ||
| stories/language-runtime-database | ||
| superpowers | ||
| 00-code-review.md | ||
| 00-principles.md | ||
| 00-status.md | ||
| 01-problem.md | ||
| 02-recovery.md | ||
| 03-data.md | ||
| 04-ui.md | ||
| 05-datalayer.md | ||
| 06-markdown-render.md | ||
| 07-ssl.md | ||
| 08-project-structure.md | ||
| cm.md | ||
| writeonce-pl.md | ||