Re:Announcing pqR: A faster version of R
by radfordneal on Sunday June 23, 2013 @12:27AM
(#5926250)
If you look at the "future directions" section of pqR's version of the "R Internals" manual, you'll see a brief mention of a plan to implement "call by name" parameter passing in the style of Algol 60, which should address this issue. Before that happens, however, pqR will improve the tracking of references to reduce the number of unnecessary copies made when parameters are passed by value, which may be more than you realize in past versions of R.
[ Parent
| on HN ]
It was my understanding that R basically already does implement call-by-name - arguments to a function are passed by name and looking up in the calling environment until you first modify them. Is my understand incorrect, or do Algol 60's call-by-name semantics mean something different?
Re:Announcing pqR: A faster version of R
by radfordneal on Sunday June 23, 2013 @01:47PM
(#5928529)
Sort of. That's why it shouldn't be too hard a modification to implement. For a call-by-name argument, you just have to evaluate the "promise" every time, rather than just the first time. (Assignment to a call-by-name argument will be a bit trickier, but not impossible.)
Is the pqR version of that manual available online?
Re:Announcing pqR: A faster version of R
by radfordneal on Sunday June 23, 2013 @08:51AM
(#5927378)
Yes, it's part of the release, and is also directly linked at radfordneal.github.io/pqR