> This is good work, but I don't think every function that doesn’t use
> 'this' is a supporting use case for bound-this functions, though. Many
> functions are like this:
>
> panels.each(function (p) { p.fadeIn(); });
>
> and that function would not benefit at all from being converted to a
> bound-this function.
>
Depending on syntax, it could be rewritten like this:
panels.each(p => { p.fadeIn(); });
which would offer gains in brevity, even though lexical this is not used.
I'm assuming that for all "non-method" function expressions, BTFs would be
preferred for this reason.
kevin
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss