The twitter thread starts here: https://twitter.com/getify/status/570614952605560838 and basically boils down to the observation that this: ``` ({ f() { return f; }}.f()) /* ReferenceError (probably) */ ``` is not semantically identical to this: ``` ({ f: function f() { return f; } }.f()) /* function f() */ ``` That is, concise methods cannot seamlessly recursively call or reference themselves. (Personally, I feel like concise methods *should* be a binding within themselves in a manner identical to named function expressions, but if this has been discussed before and discarded then I understand.)
You may notice that both of the methods above have the same name, "f", in spite of one lacking the lexical binding. Formerly, named functions always (barring internal var statements etc.) had lexical bindings to themselves, and the whole ES6 function name inference dealie breaks this correlation. I don't think this is really an important issue, though - assuming that a `.name` property equated to a binding was not a safe assumption (especially since IE never implemented `.name` but did support the binding).
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

