Re: ES6 grammar for for-loops

2015-02-17 Thread Brendan Eich

Cyrus Najmabadi wrote:


Ok.  Thanks for confirming our read of the grammar.  Is this shown on 
any breaking changes list anywhere?




It should be -- who is maintaining such a list?

Cc'ing Oliver, I believe he found a `for (var x = i in o)` use in the 
wild but it was evangelized successfully. Mike Taylor may have helped, 
cc'ing him too.


/be
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Re: ES6 grammar for for-loops

2015-02-17 Thread Allen Wirfs-Brock

On Feb 17, 2015, at 3:34 PM, Brendan Eich wrote:

 Cyrus Najmabadi wrote:
 
 Ok.  Thanks for confirming our read of the grammar.  Is this shown on any 
 breaking changes list anywhere?
 
 
 It should be -- who is maintaining such a list?
 
 Cc'ing Oliver, I believe he found a `for (var x = i in o)` use in the wild 
 but it was evangelized successfully. Mike Taylor may have helped, cc'ing him 
 too.

https://people.mozilla.org/%7Ejorendorff/es6-draft.html#sec-in-edition-6
and
https://people.mozilla.org/%7Ejorendorff/es6-draft.html#sec-in-the-6th-edition 

the above is the 7th item on the second list.


But I know, there are some things still missing from these lists so please file 
a bug if you know of a breaking change that is missing

Allen___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


RE: ES6 grammar for for-loops

2015-02-17 Thread Cyrus Najmabadi
Ok.  Thanks for confirming our read of the grammar.  Is this shown on any 
breaking changes list anywhere?

Thanks!

  -- Cyrus

From: Leon Arnott [mailto:leonarn...@gmail.com]
Sent: Tuesday, February 17, 2015 5:04 AM
To: Cyrus Najmabadi
Cc: es-discuss
Subject: Re: ES6 grammar for for-loops

That line of code looks like it came directly from a test I wrote for kangax's 
ES6 compatibility table.
Let's look at the test in its entirety:

```
try { eval('for (var i = 0 in {}) {}'); } catch(e) { return true; }
```
The grammer you describe is correct: ES6 no longer supports this useless form. 
So, a conforming implementation must throw an error when the eval() string is 
evaluated. If it does so, the test returns `true`, signifiying conforming 
support.
I hope that answers your question - and pardon my presumptions if this test 
code wasn't what you were thinking of at all.
-Leon.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss


Re: ES6 grammar for for-loops

2015-02-17 Thread Leon Arnott
That line of code looks like it came directly from a test I wrote for
kangax's ES6 compatibility table.
Let's look at the test in its entirety:

```
try { eval('for (var i = 0 in {}) {}'); } catch(e) { return true; }
```
The grammer you describe is correct: ES6 no longer supports this useless
form. So, a conforming implementation must throw an error when the eval()
string is evaluated. If it does so, the test returns `true`, signifiying
conforming support.

I hope that answers your question - and pardon my presumptions if this test
code wasn't what you were thinking of at all.

-Leon.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss