And even if function would be considered immutable, and not be objects, you'd have to get rid of the configurable (and also mutable) function.prototype which is closure-specific (and has a backpointer to the closure as .constructor).
On Thu, Jun 12, 2014 at 3:00 PM, 'Andreas Rossberg' via v8-users < [email protected]> wrote: > On 12 June 2014 14:33, Sven Panne <[email protected]> wrote: > > 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). > > Nit: Even if they were immutable, as long as functions are considered > objects (a terrible idea to boot) they have identity, and all > potential optimisations are generally out the window already. > > Mutability implies the need for identity, but it's really identity > that is the core problem. > > /Andreas > > -- > -- > v8-users mailing list > [email protected] > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list [email protected] 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
