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
Daan Leijen
中科院分区:
--
文献类型:
--
作者:
Jonathan Brachthauser;Daan Leijen

文献摘要

参考文献

被引文献

相似文献

我们引入了两个新的语言功能,称为隐式函数和隐式控制。两者都泛化了隐式值,隐式值是动态绑定的类型化实现。隐式函数是动态绑定的,但在其绑定的词法范围内进行计算。我们展示了如何从常规隐式值的小概括导致更好的抽象。特别是,隐式函数在定义位置封装(副)作用,而不是将它们泄漏到调用位置。隐式控制通过添加返回到绑定的词法范围或恢复到调用站点的能力,进一步概括了隐式函数。我们形式化的新功能作为一个扩展莫罗的演算动态绑定(1998年)。在一个框架中统一所有这三种语言特性可以保证隐式值、函数和控制之间的交互是定义良好的。我们还展示了我们的语义如何对应到代数效果处理程序的宏翻译。
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.
大众效果处理程序
DOI: 10.1145/3276481
发表时间: 2018
影响因子: --
作者:
Jonathan Immanuel Brachthäuser;Philipp Schuster;Klaus Ostermann
通讯作者: Klaus Ostermann
关于用户定义效果的表现力:效果处理程序、单子反射、分隔控制
DOI: 10.1145/3110257
发表时间: 2017
影响因子: --
作者:
Forster Y
通讯作者: Forster Y
做是做是做
DOI: 10.1145/3009837.3009897
发表时间: 2017
期刊: --
影响因子: --
作者:
Lindley S
通讯作者: Lindley S