On the design, implementation, and use of laziness in R

On the design, implementation, and use of laziness in R
复制标题

关于 R 中惰性的设计、实现和使用

DOI:
--
复制
发表时间:
2019
期刊:
Proc. ACM Program. Lang.
影响因子:
--
通讯作者:
J. Vitek
J. Vitek
中科院分区:
--
文献类型:
--
作者:
Aviral Goel;J. Vitek

文献摘要

被引文献

相似文献

R编程语言已经懒了25年。本文介绍了R中逐个呼叫的设计和实施的回顾,以及对几代程序员如何使懒惰在其代码中使用的数据驱动的研究。我们分析了16,707个包裹,并观察到270.9 B的承诺。我们的数据表明,几乎没有证据表明程序员使用懒惰来避免不必要的计算或对无限数据结构进行操作。在大多数情况下,R代码似乎是在不依赖的,并且在许多情况下甚至了解延迟的论点评估。唯一的显着例外是少数包装,这些软件包利用逐个呼叫进行元编程。
The R programming language has been lazy for over twenty-five years. This paper presents a review of the design and implementation of call-by-need in R, and a data-driven study of how generations of programmers have put laziness to use in their code. We analyze 16,707 packages and observe the creation of 270.9 B promises. Our data suggests that there is little supporting evidence to assert that programmers use laziness to avoid unnecessary computation or to operate over infinite data structures. For the most part R code appears to have been written without reliance on, and in many cases even knowledge of, delayed argument evaluation. The only significant exception is a small number of packages which leverage call-by-need for meta-programming.