Loom

A blog engine that just works. One binary, no setup, no dependencies.

Posts tagged “parametricity” (2)

Parametricity — Theorems for FreeMar 27 42.0K

If a function works for any type and never inspects it, its behavior is constrained by the type signature alone. You get theorems without proofs. This is parametricity — and it explains why phantom types, generic algorithms, and templates are more powerful than they look.

--c++20 --type-theory --parametricity --free-theorems --polymorphism
Phantom Types — Making the Compiler See What Isn't ThereMar 23 13.2K

A phantom type parameter exists only in the type system — it carries no data, occupies no memory, and vanishes in the binary. Parametricity guarantees it works. Representation independence makes it free.

--c++20 --type-theory --phantom-types --templates --zero-cost --parametricity