"no strict"; directive

Jeff Walden jwalden+es at MIT.EDU
Fri Nov 16 14:34:09 PST 2012


On 11/16/2012 02:11 PM, Andrea Giammarchi wrote:
> but I don't see caller being any better/worse than arguments and I believe arguments will stick around "forever" in any case ... so will caller, unless there's not some specific personal reason but the code just looks basically the same: find the rabbit and "ta-daaaaa"

The arguments keyword is statically detectable (or can be hedged against in the much-worse possible use of eval), which makes it far better.  fun.arguments and fun.caller are about equally bad.  And to the extent there are "correct" semantics for fun.arguments, engines break those daily whenever optimization opportunities present themselves.

In the longer run the code will not look "basically the same", so arguing from what the code looks like now, in any engine, is not especially convincing.

> but on the practical level we all know it's going to be like that, right?

I don't understand what you're saying/implying here.  Could you spell it out more clearly, please?

Jeff


More information about the es-discuss mailing list