The Best of Both Worlds: Linear Functional Programming without Compromise
J. Garrett Morris

TL;DR
This paper introduces a linear functional calculus that combines the safety of linear types with the expressive power of functional programming without compromises, using qualified types to unify linear and unrestricted functions.
Contribution
It generalizes abstraction and application to include both linear and unrestricted functions, maintaining key theoretical properties and expressiveness.
Findings
Linear values are first-class citizens in the language.
The system maintains principal types and decidable type inference.
Evaluation respects linearity and extends existing calculi conservatively.
Abstract
We present a linear functional calculus with both the safety guarantees expressible with linear types and the rich language of combinators and composition provided by functional programming. Unlike previous combinations of linear typing and functional programming, we compromise neither the linear side (for example, our linear values are first-class citizens of the language) nor the functional side (for example, we do not require duplicate definitions of compositions for linear and unrestricted functions). To do so, we must generalize abstraction and application to encompass both linear and unrestricted functions. We capture the typing of the generalized constructs with a novel use of qualified types. Our system maintains the metatheoretic properties of the theory of qualified types, including principal types and decidable type inference. Finally, we give a formal basis for our claims of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
