The Secrets of Polymorphic Variants
summary
Claims that polymorphic variants (OCaml/Reason structural typing) let functions accept differently named but structurally identical records, shows a quick hack to recover hidden record types by assigning a bogus value so the compiler prints fields, demonstrates that the project uses ocaml decoders to parse megabytes of JSON and that structural typing enables structural typing for cross-library JSON interop, and warns that while reuse works the cost is that error messages explode into huge unnamed object types making debugging painful.
AI-written summary · about








