Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ES5 "strict" and arguments.callee [duplicate]

Possible Duplicate:
Why was the arguments.callee.caller property deprecated in JavaScript?

In ES5 strict mode (i.e. "use strict") the arguments.callee variable that refers to the current function is no longer available.

For recursive functions it's obviously sensible to use the function's own name. However there are times when I might want to use properties of arguments.callee (i.e. .length, .prototype) without having to use the name of the current function.

Can anyone explain what apparent problem was (allegedly) solved by removing it?

like image 509
Alnitak Avatar asked Aug 31 '12 14:08

Alnitak


1 Answers

From here.

arguments.callee substantially hinders optimizations like inlining functions, because it must be made possible to provide a reference to the un-inlined function if arguments.callee is accessed.

like image 72
xdazz Avatar answered Sep 19 '22 03:09

xdazz