On 14.04.2011 23:48, David Herman wrote:
Dynamic binding is bad, mmmkay? ;)
Mmmkay, Mr. Mackey :P But the main reason is increasing of performance.
Of course, the understanding of _your bindings_ (i.e. which vars are
present in the program) is also the reason, but it seems manageable.
Seriously, it's not an efficiency thing. Dynamic scope is easy to write but
hard to predict. JS is lexically/statically scoped almost everywhere, except
for with, eval, and the global object. Strict mode solves with and eval.
Harmony solves the global object.
Yeah.
You said (in the next letter) that it will be a local (like the let- ones) binding.
Seems, it will "break" previous semantics.
No, it doesn't. The previous semantics doesn't include local functions. That's
a non-standard extension.
Yes, I know it's non-standard, but anyway the old code (at least with
the most logical approach in SpiderMonkey if people used them) will be
broken. But, let's hope a percentage of such uses is small, since,
repeat, currently the best practice is to avoid them.
Dmitry.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss