Programming with Implicit Values, Functions, and Control (or, Implicit Functions: Dynamic Binding with Lexical Scoping)
Programming with Implicit Values, Functions, and Control (or, Implicit Functions: Dynamic Binding with Lexical Scoping)
复制标题
使用隐式值、函数和控制进行编程(或隐式函数:具有词法作用域的动态绑定)
DOI:
--
复制
发表时间:
2019
期刊:
影响因子:
--
通讯作者:
Daan Leijen
中科院分区:
文献类型:
--
作者:
Jonathan Brachthauser;Daan Leijen
We introduce two new language features, called implicit functions and implicit control. Both generalize implicit values which are a typed implementation of dynamic binding. Implicit functions are bound dynamically but evaluated in the lexical scope of their binding. We show how this small generalization from regular implicit values leads to better abstraction. In particular, implicit functions encapsulate (side) effects at the definition site, as opposed to leaking them to the call site. Implicit control further generalizes implicit functions by adding the ability to return into the lexical scope of the binding or to resume to the call-site. We formalize the new features as an extension to Moreau’s calculus of dynamic binding (1998). Unifying all three language features in one framework guarantees that the interaction between implicit values, functions, and control is well-defined. We also show how our semantics correspond to a macro-translation into algebraic effect handlers.
影响因子:
--
作者:
Jonathan Immanuel Brachthäuser;Philipp Schuster;Klaus Ostermann
通讯作者:
Klaus Ostermann
影响因子:
--
作者:
Forster Y
通讯作者:
Forster Y
DOI:
10.1145/3009837.3009897
发表时间:
2017
期刊:
--
影响因子:
--
作者:
Lindley S
通讯作者:
Lindley S