[Rcpp-devel] Checking for a promise

Gabor Grothendieck ggrothendieck at gmail.com
Sun Dec 26 19:36:01 CET 2010


On Sun, Dec 26, 2010 at 12:07 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 25 December 2010 at 17:22, Gabor Grothendieck wrote:
> | It seems that there are no facilities for this in Rcpp -- at least I
> | haven't found them.  It seems one has to go one level lower to do
>
> Patches are always welcome, particularly if they come with use cases
> motivating them ("Does it make things easier? Or faster? Or at least make
> them possible?")  as well as unit tests and documentation.
>
> | this.  The code below works.  It passes an environment and name and
> | returns the type code.  I think this sort of functionality was
> | intentionally left out of R itself and if one were just trying to
> | emulate R then I can understand it not being there but since Rcpp is
> | intended for performance it might be a good idea to give this sort of
> | access to promises without forcing the program to use the lower level
> | facilities.
>
> Well, why?  I do not use delayedAssign() all that much in R; I haven't needed

I did address this already in the paragraph you quote but in case it
wasn't clear its to make the code run faster.  Promises that are not
used never need be evaluated saving the time that such evaluation
would have otherwise taken.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com


More information about the Rcpp-devel mailing list