Alex Russell wrote:
On Sep 28, 2012, at 7:54 AM, Brendan Eich<[email protected]> wrote:
Rick Waldron wrote:
# Thin Arrow?
(Presented by Brendan Eich, Mozilla)
We have the fat-arrow, supported by Kevin Smith's research, it's a win. Some
voices in the community don't want the unexpected behaviour of the soft-bound
lexical `this`
"bound 'this'" would do -- "hard-bound" if you insist.
I think soft-bind is dead as discussed here, since it adds a flag argument or
equivalent that must be set by every caller anywhere
It's demonstrably the same overhead as hard binding.
Yes (and I reject your bogus jargon :-P), but that's not the point. The
comparison to make is with all functions, not just bound functions.
With soft-bind, *every call* to *any function* would have an extra
parameter, even if the function has dynamically bound |this|; or else
target soft-bound functions would have to be dynamically
recompiled/respecialized (equivalent to the extra parameter).
See https://mail.mozilla.org/pipermail/es-discuss/2012-May/023002.html,
quoting:
2. Implementations including beloved V8 and venerable SpiderMonkey would
have to recompile target soft-bound functions, or else provide an extra
parameter to replace what is for =>a lexical up-var reference. And extra
parameters and/or recompilation steps cost performance and code
complexity, always.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss