`free` operator

David Herman dherman at mozilla.com
Thu Oct 25 21:45:32 PDT 2012

On Oct 25, 2012, at 9:38 PM, Yehuda Katz <wycats at gmail.com> wrote:

> Any proposal that destroys this invariant:
> function() {
> var x = obj();
> // other statements not involving x
> x // still defined
> }
> destroys local reasoning and would almost certainly do more harm than good.

Agreed. This is analogous to the idea of Proxy.attach, where any (non-local) code can come along and mutate meta-level behavior of an object. In the case of Proxy.attach, it's modifying the behavior of the various object operations. In the case of `free' it's modifying the object-ness entirely.


More information about the es-discuss mailing list