name property for built-in functions??
brendan at mozilla.com
Fri Mar 6 09:46:45 PST 2009
On Mar 6, 2009, at 9:12 AM, Mark S. Miller wrote:
> On Thu, Mar 5, 2009 at 11:18 PM, Brendan Eich <brendan at mozilla.com>
>> A function object (remember joined function objects in ES3?)
>> created from
>> the compiler-created immutable-shared function may or may not have
>> a name
>> property in the proposal, but calling toString on a function object
>> (to form a closure) should not, in my opinion, get the value of the
>> property of that particular (or any other) closure object.
>> Setting the name of the compiler-created function by assigning a
>> property to
>> one of N (N>=1) unjoined function objects could be done. No more
>> but the "shared" still applies. I do not favor this, but it could
>> be done. I
>> suspect the Obj-J folks want it.
> I strongly object. Such sharing of state, enabled only by sharing the
> same function literal in the code, violates all notions of state
> isolation. It presents all the same hazards that the ES3 sharing of
> mutable RegExp literal objects had. The current draft spec repairs all
> such leaks. Let's not introduce another.
I obviously agree, but let me agree more strongly. Huzzah!
More information about the Es-discuss