Effects as Capabilities: Effect Handlers and Lightweight Effect Polymorphism

Proceedings of the ACM on Programming Languages(2020)

引用 42|浏览22
暂无评分
摘要
Effect handlers have recently gained popularity amongst programming language researchers. Existing type-and effect systems for effect handlers are often complicated and potentially hinder a wide-spread adoption. We present the language Effekt with the goal to close the gap between research languages with effect handlers and languages for working programmers. The design of Effekt revolves around a different view of effects and effect types. Traditionally, effect types express which side effects a computation might have. In Effekt, effect types express which capabilities a computation requires from its context. While this new point in the design space of effect systems impedes reasoning about purity, we demonstrate that it simplifies the treatment of effect polymorphism and the related issues of effect parametricity and effect encapsulation. To guarantee effect safety, we separate functions from values and treat all functions as second-class. We define the semantics of Effekt as a translation to System E, a calculus in explicit capability-passing style.
更多
查看译文
关键词
algebraic effects,effect handlers,effect polymorphism
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要