[Rd] Capturing environment associated with a promise

luke-tierney at uiowa.edu luke-tierney at uiowa.edu
Mon Oct 8 16:35:52 CEST 2012


Promises are an implementation detail -- we need to be able to change
them, optimize them away, etc, so there is a limit on what we want to
expose.  Allowing a query of whether a binding is delayed or not
should be OK but would want to think that through more carefully
before committing to this.

luke

On Mon, 8 Oct 2012, Hadley Wickham wrote:

> Hi all,
>
> It's possible to capture the expression associated with a promise
> (using substitute). Is there any way to capture the environment
> associated with a promise?  Similarly, is there any way to tell if
> something is a promise without accidentally evaluating it?
>
> Thanks!
>
> Hadley
>
>

-- 
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:   luke-tierney at uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu



More information about the R-devel mailing list