In “The Unreasonable Effectiveness of Constructive Data Modeling,” Alexis King g...

@aartaka@merveilles.town

In “The Unreasonable Effectiveness of Constructive Data Modeling,” Alexis King gives a lot of reasons for static typing that people often propose. However, she misses one important reason I consider prime for type systems: explanatory. Types are documentation for the data that explain its uses and shapes to the fellow programmer. That also happen to talk to the computer and enforce some restrictions / invariants on the code.

That’s how I view types. It might be similar to the domain modelling point she lists, but the purpose is not representing ideas for the machine, but rather for the fellow code reader.

youtu.be/0BXuYlNrUmE?t=982