Your point about decorators vs. hoisting is good, everyone should keep it in mind. Still doesn't mean we can't add a special form for const function, as followups aver.

/be

Alexander Jones wrote:
On 19 May 2015 at 02:02, Brendan Eich <[email protected] <mailto:[email protected]>> wrote:


    This seems like a better shorthand to discuss, compared to `let
    function` (which function-in-block covers already, as noted).


function-in-block does not have the same semantics as the proposed "let function". It hoists, thus has no TDZ, and appears to preclude a reasonable decorator syntax behaviour, and it has no provisions for const binding, i.e. "const function".

    let f(x) => y

appears attractive indeed, but by virtue of it being an arrow function, has lexical this and no prototype property. Also no generator syntax, unless I'm missing something?

Cheers
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to