一句话:提出基于模态效应类型的新方法,无需显式效应多态即可静态保证效应操作均被处理。
Effect handlers 是定义、定制与组合计算效应的强大抽象。要在静态上保证所有效应操作都被处理,通常需要效应系统,但传统效应系统会要求在语言已有的数百万行代码中添加大量效应标注。近期方案试图消除显式效应多态的需求,但它们往往依赖脆弱的语法机制,或引入独立的二等函数概念。本文提出一种基于模态效应类型(modal effect types)的新方法,旨在以类型系统方式解决上述问题。摘要未给出具体形式化细节、实现或评估结果,核心贡献是提出这一新方向。
Effect handlers are a powerful abstraction for defining, customising, and composing computational effects. Statically ensuring that all effect operations are handled requires some form of effect system, but using a traditional effect system would require adding extensive effect annotations to the millions of lines of existing code in these languages. Recent proposals seek to address this problem by removing the need for explicit effect polymorphism. However, they typically rely on fragile syntactic mechanisms or on introducing a separate notion of second-class function. We introduce a novel approach based on modal effect types.
@article{paperbot3186,
title = {Modal Effect Types},
author = {Wenhao Tang and Leo White and Stephen Dolan and Daniel Hillerström and Sam Lindley and Anton Lorenzen},
journal = {Proceedings of the ACM on Programming Languages},
volume = {9},
number = {OOPSLA1},
year = {2025},
doi = {10.1145/3720476}
}