FunctionDeclaration as an element of a Block statement's StatementList
dhtmlkitchen at gmail.com
Tue May 20 12:58:30 PDT 2014
"Prior to the Sixth Edition, the ECMAScript specification did not
define the occurrence of a FunctionDeclaration as an element of a
Block statement's StatementList."
The problem is not necessarily that FunctionDeclaration appears in a
Block, that FunctionDeclatation appears in places in a program where
a Statement is permitted but a FunctionDeclaration is not.
ES5 mentioned it:
"Several widely used implementations of ECMAScript are known to
support the use of FunctionDeclaration as a Statement."
I don't have a concrete proposal, but I wonder why specifying as ES6
does makes less sense to take the text that ES5 had in s 12 and
attempt to codify, as ES6 does, except using Statement instead of
More information about the es-discuss