What we eval in the shadows: A large-scale study of eval in R programs

3Citations
Citations of this article
6Readers
Mendeley users who have this article in their library.

Abstract

Most dynamic languages allow users to turn text into code using various functions, often named eval, with language-dependent semantics. The widespread use of these reflective functions hinders static analysis and prevents compilers from performing optimizations. This paper aims to provide a better sense of why programmers use eval. Understanding why eval is used in practice is key to finding ways to mitigate its negative impact. We have reasons to believe that reflective feature usage is language and application domain-specific; we focus on data science code written in R and compare our results to previous work that analyzed web programming in JavaScript. We analyze 49,296,059 calls to eval from 240,327 scripts extracted from 15,401 R packages. We find that eval is indeed in widespread use; R's eval is more pervasive and arguably dangerous than what was previously reported for JavaScript.

Author supplied keywords

Cite

CITATION STYLE

APA

Goel, A., Donat-Bouillud, P., KÅTMikava, F., Kirsch, C. M., & Vitek, J. (2021). What we eval in the shadows: A large-scale study of eval in R programs. Proceedings of the ACM on Programming Languages, 5(OOPSLA). https://doi.org/10.1145/3485502

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free