Resource polymorphism: proposal for integrating first-class resources into ML
Résumé
Resource management deals with various aspects of reasoning about the state of a program. The C++/Rust programming model puts to the fore the concept of destructor as a central programming feature for resource management.
Building upon an idealised understanding of the concept of destructor and resource types, it is possible to integrate resources as a language feature for ML. To make the feature first-class, some notion of resource polymorphism is needed. One goal is to better integrate functional programming with systems and parallel programming. In this talk, I will in particular focus on how one can mix GC and linear allocation with re-use as memory management strategies in the same language.
This talk is based on a proposal to extend ML with first-class resources [1]. It circulated widely at the time; however it has not yet been presented to the ICFP audience. This talk comes back on this proposal and highlights what is new (still today) and what are some of its challenges.
[1]: Resource Polymorphism, 2018, https://arxiv.org/abs/1803.02796