On Thu, Sep 11, 2008 at 5:59 PM, Peter Michaux <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 11, 2008 at 12:11 PM, Jon Zeppieri <[EMAIL PROTECTED]> wrote:
>
> [snip]
>
>> I imagine the appeal of arguments.callee comes from the fact that it
>> allows programmers to rename functions without having to change
>> recursive calls within the body of the function.
>
> It makes recursive calls inside anonymous functions possible.
No. See "fixpoint combinator."
But that's a somewhat flippant response. More to the point: if you
want recursion, one way or another, you need to be able to refer to
the function in question. 'arguments.callee' allows you to refer to
it but violates the Tennent Correspondence. So, given that you can
either refer to the function this way:
var foo = bar() { ... bar ...}
or this way:
function bar() { ... arguments.callee ... }
... it's not clear to me what advantage the latter has over the former
(IE bugs aside, that is). Anonymity itself doesn't seem to be a
virtue.
-Jon
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss