Two paragraphs in BUILT.md superseded in place, and the spike report says it is one

BUILT.md appends and never dates, so a paragraph that was true when it was
written reads as fact forever. Two are not: the map type spelling is (Map K V)
and braces in type position are refused by name, and sand.flan has not called
load-texture since it was cut back to port parity. Both get the parenthetical
the FLAN_RAYLIB_H paragraph already got rather than an edit, since that is the
convention the file has.

SPIKE-GENERICS.md gets the treatment overview.md has: a header saying what it is
and when it stopped being current. Its body stays. The two things in it that
would now mislead are named there -- its account of what plan.org says, which
plan.org has since overtaken, and the bare-t-at-every-use rule, which is narrower
than what shipped, since (Option t) does not compile.
This commit is contained in:
Joseph Ferano 2026-09-14 07:34:29 +07:00
parent dcba88ffd6
commit f47f9ffe59
2 changed files with 22 additions and 0 deletions

View File

@ -2615,6 +2615,12 @@ allocation guard, so a `retry` re-attempts the allocation and not the expression
literal's field list, and giving the same braces two meanings is what the colon-to-dot change was for. A map is built literal's field list, and giving the same braces two meanings is what the colon-to-dot change was for. A map is built
with `map-new` and filled with `put`. with `map-new` and filled with `put`.
*(Superseded on the first half only. `(Map K V)` is the type spelling and `{K V}` was withdrawn — braces in type
position are refused by name, because the brace's value and type meanings never corresponded the way the bracket's do
and `{}` in type position is wanted for anonymous struct types. The paragraph's actual subject is unchanged: there is
still no map literal, and a bare map form in expression position is still a struct literal's field list. See
`lib/parse.ml:68`.)*
### The refusals, each by name ### The refusals, each by name
- A **float key** — not a milestone question, which is why it is said separately. NaN is not equal to itself, and - A **float key** — not a milestone question, which is why it is said separately. NaN is not equal to itself, and
@ -3847,6 +3853,11 @@ raylib to open. Pointing raylib at embedded bytes needs `LoadImageFromMemory` an
`LoadTexture` — a raylib binding question, not an embedding one — so the flagship program is not yet asset-free on the `LoadTexture` — a raylib binding question, not an embedding one — so the flagship program is not yet asset-free on the
web. The mechanism it needs is in. web. The mechanism it needs is in.
*(Superseded by the cut. `sand.flan` was taken back from 765 lines to 206, to parity with the Clojure, Common Lisp and
jank ports, and the texture went with it — there is no `load-texture` call and no asset left to embed, only a
`brush-size` integer that kept the name. The binding question is still open for whatever wants it next; this program is
no longer the one asking it, and `brush.png` is now unreferenced.)*
## `slurp`, `barf`, and the two ways they fail ## `slurp`, `barf`, and the two ways they fail
NEXT.md decisions 2 and 5. `(slurp path)` and `(slurp path allocator)` read a whole file into a `(Vec u8)`; NEXT.md decisions 2 and 5. `(slurp path)` and `(slurp path allocator)` read a whole file into a `(Vec u8)`;

View File

@ -1,5 +1,16 @@
# The generics spike, answered: it runs, and the bill lands on the dev loop rather than on the checker # The generics spike, answered: it runs, and the bill lands on the dev loop rather than on the checker
> **This is the spike report and it stopped being current when generics landed for real, on 2026-09-13.**
> It is kept because the measurements and the reasoning behind the design are still the ones that were
> acted on, but it describes a branch where `lib/prelude.ml` and the backends were untouched, and they
> are not any more: the prelude's per-type families collapsed into one function each. Two things it says
> have since been overtaken and would mislead anyone writing code from it. Its account of plan.org is out
> of date — plan.org now specifies `$t` itself rather than lowercase-with-no-sigil. And the spelling rule
> below is narrower than what shipped: `$t` is written wherever a *type* goes, including in a return type
> and nested inside `[$t]` or `(Option $t)`, and bare `t` only where a type's *name* is an argument in
> expression position, as in `(vec-new t)` and the cast `(t x)`. `(Option t)` does not compile.
> plan.org's Types section and spec-memory.md's Generics section are the current account.
Milestone 5's parametric polymorphism, run early and deliberately out of order, as a spike rather than as a Milestone 5's parametric polymorphism, run early and deliberately out of order, as a spike rather than as a
decision. **Feasible, and smaller than expected.** A generic function written in Flan goes through the ordinary decision. **Feasible, and smaller than expected.** A generic function written in Flan goes through the ordinary
frontend, is instantiated at each concrete type its call sites ask for, is emitted as real functions and runs, frontend, is instantiated at each concrete type its call sites ask for, is emitted as real functions and runs,