John Garvin, Compiling R's Imperative Call-By-Need

R is a programming language and environment widely used in statistics. I discuss a work in progress: how to analyze R's calling conventions in a compiler. R is both call-by-need and imperative; that is, arguments are evaluated lazily, and assignments and side effects are common. To my knowledge, no other language has both of these attributes. I discuss how to determine when it's valid to transform call-by-need into call-by-value, which can be compiled more efficiently. I'll discuss some ideas for using the analysis to change the code.