Hacker News with Generative AI: Type Systems

Nominal for Storing, Structural for Manipulating (bearblog.dev)
Something that comes up sometimes in programming languages is the difference between nominal and structural type systems.
Adding row polymorphism to Damas-Hindley-Milner (bernsteinbear.com)
Damas-Hindley-Milner (HM) is a type system for Standard ML and the ML-family languages.
Damas-Hindley-Milner inference two ways (bernsteinbear.com)
Damas-Hindley-Milner (HM) is a type system for the lambda calculus (later adapted for Standard ML and the ML-family languages) with parametric polymorphism, aka generic functions. It sits at a sweet spot in PL design: the type system is quite expressive, and there are well known type inference algorithms that require absolutely no annotations from the programmer.
A dictionary of single-letter variable names (jackkelly.name)
Haskell’s expressive type system means that type signatures can carry a lot of information. Haskell’s polymorphism means that you sometime write a function that works across an enormous range of types, and are often left wondering “what do I actually call my variables?”. It is often the case that there’s nothing to say beyond “this variable is a Functor”, or “this variable is a monadic action”, and so a single-letter variable name is appropriate.
Flux: Refinement Types for Rust (youtube.com)
Higher-kinded bounded polymorphism in OCaml (2021) (okmij.org)
A type system for RCL, part 2: The type system (ruudvanasseldonk.com)
Counterexamples in Type Systems (counterexamples.org)
Moving Beyond Type Systems (vhyrro.github.io)
TypeScript: Branded Types (prosopo.io)