d at domenic.me (2015-02-13T23:51:45.291Z)
If it wasn't for backward compatibility, "var" would disappear entirely, leaving only lexical "let" "const" and "function", making VariableStatement disappear as well.
If it wasn't for backward compatibility, "var" would disappear entirely, leaving only lexical "let" "const" and "function", making VariableStatement disappear as well.
On Mon, Feb 2, 2015 at 8:21 AM, Felix Kling <list at felix-kling.de> wrote: > With ES6 having a production rule "Declaration" and ES5 having > "FunctionDeclaration", I'm curious why a variable declaration (as we say), > officially "VariableStatement", has not been originally defined as a > declaration (back then). > > Would you consider it to be a declaration today if we didn't need > backwards compatibility? Or is there another reason that requires it to be > a statement? > If it wasn't for backward compatibility, "var" would disappear entirely, leaving only lexical "let" "const" and "function", making VariableStatement disappear as well. -- Cheers, --MarkM -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150202/9482bc8f/attachment.html>