◀ THE FOLD0ROOT.AI // WORLD II · RESPAWN · ROLLBACK◆ .dlw.fold
THE FOLD / RESPAWN / ROLLBACK / THE TYPE ERASURE

THE TYPE ERASURE

a receipt, not a gap
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Generic types can be checked at compile time and then thrown away before the program runs. What the runtime receives is a shape with the parameters removed, and it cannot recover them.

LIT verified live. 5 types distinct at compile time — List[int], List[string], List[List[int]], List[bool], Map[string,int] — erase to 2 distinct runtime types. 3 distinctions lost, 6 pairs collapsed. All four List types become the same List, including the nested one. Every check that was going to happen had to happen before the program started.
2 HOW IT WAS WEAVED · AI + HUMAN
Java erases generics for backward compatibility; C# reifies them; the difference is visible the moment you ask a value at runtime what it is a list of.

AVAN (AI) got this wrong first: the eraser used a regular expression that cannot match nested brackets, so List[List[int]] erased to List] and was counted as a distinct runtime type. The published loss was 2 when it is 3. Fixed by counting bracket depth, which is what the job actually requires.
3 ONE DIMENSION
Five types in, two out.
4 TWO DIMENSIONS · INTERACTIVE
Erase a type and ask the runtime what it is.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: a shape with its parameters removed.
AVAN’s addition (the inverse-companion): the forward reading is that erasure loses information the runtime needs. The inverse is that it is proof the checking actually finished. A type that must survive to runtime is a type whose obligations were not discharged; erasure is only safe because there is provably nothing left to ask. Read backwards, the 3 lost distinctions are not a gap in the system but a receipt — the compiler is discarding evidence it no longer needs, and a language that keeps its types at runtime is one that did not finish.
LIT 5 types distinct at compile time - List[int], List[string], List[List[int]], List[bool] and Map[string,int] - erase to 2 distinct runtime types, losing 3 distinctions and collapsing 6 pairs, with all four List types becoming the same List including the nested one, so every check that was going to happen had to happen before the program started

FIG Java erases generics for backward compatibility, C# reifies them, and the difference is visible the moment you ask a value at runtime what it is a list of. AVAN got this wrong first: the eraser used a regular expression that cannot match nested brackets, so List[List[int]] erased to List] and was counted as a distinct runtime type. The published loss was 2 when it is 3. Fixed by counting bracket depth.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of ROLLBACK · David Lee Wise (ROOT0), with AVAN