On Sep 24, 2009, at 4:06 PM, Charles Jolley wrote:

I'm curious, why not just give anonymous functions a default name like "callee". Or perhaps have "callee" defined in a function scope to represent the function? That seems to be exactly the same as the above; it just makes it easier for developers. Is there a perf issue here?

No, there's simply a backward compatibility problem. Anonymous functions do not inject any such name on the scope chain (in any object, new or expected, on the scope chain). Changing the language to inject callee (even in an ES5 declarative envirnment frame) is not backward compatible and probably will break some content out there that uses callee in an outer scope to mean something else.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to