>
> As far as I have understood "Total Function Expressions" is supposed to
> return all functions that do not contain "this" in their initial scope and
> that have a "var self=this" trick that is used somewhere inside the
> function (ie function() {var self=this;var b=function()
> {console.log('test')} is not a BTF candidate because self is not used),
> correct ?
>Sorry, no. As stated previously, I'm assuming for the purposes of this analysis that BTFs will be used in cases where (a) we want lexical "this" and (b) we don't care about "this" at all. Why in the second case? Because BTF syntax will be more concise and will generally express the intent better. When I started this research, I wasn't aware of the "tri-lambda" work being done, and specifically the proposal that there be two short function syntaxes: one for classic functions (->) and one for bound this (=>). Clearly some of the BTF candidates could go either way, and we really can't make that distinction in this analysis. kevin
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

