Brendan Eich (2015-02-02T19:14:22.000Z)
d at domenic.me (2015-02-13T23:52:41.461Z)
Felix Kling wrote: > > That made me wonder why /VariableStatement/ was a /Statement/ to begin > with? Maybe the concept of a "declaration" wasn't really developed > back then, but then what was the reasoning for /FunctionDeclaration/ > not being a /Statement/ (was it even part of ES1? I don't know) ? > Yes, see http://ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%201st%20edition,%20June%201997.pdf -- anyone can check. In ES1, functions were only top-level, per (14): ``` Program : SourceElements SourceElements : SourceElement SourceElements SourceElement SourceElement : Statement FunctionDeclaration ``` That's why FunctionDeclaration was separate from the start. > I would accept the answer "because Brendan had to develop the language > in such a short time and that's just the way he did it" ;) The ES grammar reflects what was in "JS1", indeed.