Closed Bug 725398 Opened 12 years ago Closed 12 years ago
Deprecation of arguments
.callee: how to deal with the case of instances of Function constructor?
I think the question you are asking is: how do I write a recursive function when using the Function constructor without arguments.callee? If so, it requires a bit of grossness, but you can write: var fac = let (f = new Function('f', 'x', 'return x == 0 ? 1 : x * f(f, x-1)')) f.bind(null, f); using 'bind' to allow callers to simply write 'fac(x)' instead of 'fac(fac, x)'.
Because that's what the spec says. Your argument's not with us, it's with the spec. Since we're going to follow the spec, I think your complaint lies with them, not with us. Feel free to contribute to the mailing list if you want: https://mail.mozilla.org/listinfo/es-discuss If and when the spec says something other than what it says now, we'll update to include it. But for now, I don't think there's anything here that we plan to change.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
If you are interested in this debate, it continues here: https://bugs.ecmascript.org/show_bug.cgi?id=263
You need to log in before you can comment on or make changes to this bug.