On Thu, Jul 11, 2013 at 2:00 AM, Andrew Fedoniouk
<news at terrainformatica.com  <https://mail.mozilla.org/listinfo/es-discuss>> 
wrote:
>/  Did we consider green gases emission increase that will happen due to that
/>/   double parsing of code that currently is parsed strictly once?
/>/
/>/  ( Consider that rhetoric question above as just a reminder that ES6
/>/    parser will be used for existing web code when it will deployed for
/>/    pretty much each connected machine and device ).
/
Hmm. Well, there is a lot of back and forth in those lines, so I'm not
sure what to make of them. Either the new features are wasteful or
they're not. Pick a position and quantify it. Let's have it out.

[...]

In the case of destructuring assignment, we don't rewind and do a
second parse, even if it *does* turn out that you're doing
destructuring assignment. We just have to re-interpret the AST for the
left-hand side that we just parsed as a left-hand side.

And it almost works [1] . ;-) But no worries, it will only get worse when you add destructuring with defaults to the mix or the CoverInitialisedName production. :-/
Like this `({a} = {}) => {}` or this `({a = {}} = {}) => {}` ...


- André


[1] https://bugzilla.mozilla.org/show_bug.cgi?id=866624


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

Reply via email to