Ye olde arguments argument (was: Topic list - pending changes and issues for the ES3.1 spec)

Jon Zeppieri jaz at bu.edu
Thu Sep 11 17:29:22 PDT 2008


On Thu, Sep 11, 2008 at 7:07 PM, liorean <liorean at gmail.com> wrote:
>
> Well, having had a few moments to think about it, I actually think I
> can give you some examples of when arguments.callee works but not the
> function name:
>
> - Functions created by function declarations do not provide a separate
> inner name, and as such are subject to potential name rebinding,
> especially with the shared global object between separate scripts.

I think you misunderstood my argument.  My original example was to rewrite:

function foo() { ... arguments.callee ... }
   as
var foo = function bar() { ... bar ... }

The former is a function declaration, and the latter isn't.  So,
obviously, I was never claiming that you could rip arguments.callee
out of code without changing from one to the other.


More information about the Es-discuss mailing list