On 12-10-08 9:22 AM, 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?


Neither of those is possible in user-level code. The special functions get to see their arguments unevaluated, but users can't write specials, and there is no special to extract an environment from a promise.

I think the reasoning is that it keeps the semantics simpler, but I can't remember the cases that make user-level promise handling problematic.

Duncan Murdoch

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to