On Thu, Jun 12, 2014 at 1:51 PM, Jakob Kummerow <jkumme...@chromium.org>
wrote:

> Right. "Closure" is a bit of an overloaded term. I meant function objects
> (or "instances" if you prefer). Even if they don't access variables from
> their outer scope, by executing "foo = function() {...}" every time the
> constructor runs, you'll get a new function object (i.e. a new "closure")
> every time. [...]
>

Just a quick note: This has nothing to do with closures, it is a
consequence of the spec requirement that functions are mutable objects in
JavaScript. You can e.g. assign properties to them, mutate those
properties, etc. So every spec conforming implementation *has to* create a
new function object (unless it can prove that the program doesn't use this
aspect of the function object in question, which is impossible in general).

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to