Alexander Jones (2015-05-14T19:09:29.000Z)
d at domenic.me (2015-06-01T18:10:12.941Z)
Yep, that's the reason. It's invalid with 'use strict' to put function declarations inside an if or for block, and function declarations get hoisted. Alternatively, as we have object shorthand notation, e.g. { foo() {}, } that does not require the function keyword, yet still acts like a function, expresses a property named foo that is a function with name property "foo". So maybe in the same spirit we could also consider let foo() {}; But generators would look a bit weird without the function keyword...! let *foo() {} Agree this is not exactly the most pressing issue, but it seems easy to implement as it has trivial equivalence to existing language (unforeseen grammar ambiguities notwithstanding!), and having to repeat the name when defining scoped functions is a bit of a wart IMO.