POPL 2027
Sun 10 - Sat 16 January 2027 Mexico City, Mexico

Linear type systems often suffer from a \emph{threading problem}: if a value is used more than once, then it must be explicitly threaded through each usage. Existing solutions introduce extra language features to mitigate this, but at the cost of complicating the core language and its semantics. This article introduces \emph{flow typing}, a new solution to the threading problem that avoids the need to extend the core language. Flow typing is based on the theory of \emph{lenses}, a functional presentation of mutable references, in which lens terms mutate parts of a stateful typing context in a controlled way. Because this approach is purely functional, it can be implemented in a standard linear lambda calculus, providing flow typing with a simple and direct semantics.