Designing interrupts for ML and OCaml
Résumé
This talk reports on ongoing work to propose a sound design for asynchronous exceptions (or interrupts, in ML parlance) in the OCaml language, inspired by fault-tolerance concepts and Rust's design for exceptions.
We first describe the problems of recovering from interrupts in Standard ML and OCaml, and how these language deficiencies have been worked around, notably in the implementation of proof assistants and other interactive tools.
We then aim to explain more conceptually how safe interrupt handling is possible by evolving ML exceptions. We emphasize key notions: exception-safety concepts originating from C++ and Rust's extension of Erlang's "let it fail" approach to shared mutable state. Lastly we will discuss considerations specific to the OCaml language.
This work suggests, in the spirit of structured programming, that while the ML notion of exception lacks structure, it refines into better-structured abstractions for error handling, suggested by its relevant usage by programmers.
Domaines
Langage de programmation [cs.PL]Origine | Fichiers produits par l'(les) auteur(s) |
---|