Re: ES6 draft, Rev20 is now available

2013-10-31 Thread Anne van Kesteren
On Wed, Oct 30, 2013 at 7:52 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: I don't understand what is special about the web APIs in this regard. On the accepting side in ES we generally allow no breaking changes. Wherever there was an existing API that accepted old-style array likes we

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Anne van Kesteren
On Tue, Oct 29, 2013 at 4:50 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: Spread now requires an Iterable rather than an array-like This is different from how sequenceT behaves in IDL. (It uses array-likes.) :/ -- http://annevankesteren.nl/

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Brendan Eich
Anne van Kesteren wrote: OnTue, Oct 29, 2013 at 4:50 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: Spread now requires an Iterable rather than an array-like This is different from how sequenceT behaves in IDL. (It uses array-likes.) :/ This is more general, since array-likes

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Anne van Kesteren
On Wed, Oct 30, 2013 at 5:14 PM, Brendan Eich bren...@mozilla.com wrote: Anne van Kesteren wrote: This is different from how sequenceT behaves in IDL. (It uses array-likes.) :/ This is more general, since array-likes should be iterable to be like arrays, which are iterable. So this seems

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Brendan Eich
Anne van Kesteren wrote: On Wed, Oct 30, 2013 at 5:14 PM, Brendan Eichbren...@mozilla.com wrote: Anne van Kesteren wrote: This is different from how sequenceT behaves in IDL. (It uses array-likes.) :/ This is more general, since array-likes should be iterable to be like arrays,

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Boris Zbarsky
On 10/30/13 7:57 AM, Anne van Kesteren wrote: On Tue, Oct 29, 2013 at 4:50 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: Spread now requires an Iterable rather than an array-like This is different from how sequenceT behaves in IDL. (It uses array-likes.) :/ We could change that if we

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Andrea Giammarchi
* are gone On Wed, Oct 30, 2013 at 11:00 AM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: This is promoting a fix in the `Object.prototype` ... and since I believe those dark days where `Object.prototype` shouldn't be touched due for/in loops, I like it ^_^ Or maybe it's just a

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Allen Wirfs-Brock
On Oct 30, 2013, at 10:51 AM, Boris Zbarsky wrote: On 10/30/13 7:57 AM, Anne van Kesteren wrote: On Tue, Oct 29, 2013 at 4:50 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: Spread now requires an Iterable rather than an array-like This is different from how sequenceT behaves in IDL.

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Boris Zbarsky
On 10/30/13 2:28 PM, Allen Wirfs-Brock wrote: All that is needed is to add an @@iterator method whose definition is identical to http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values Right. Pretty sure Gecko already ships just that (with a hack where we use an

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Anne van Kesteren
On Wed, Oct 30, 2013 at 7:01 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 10/30/13 2:28 PM, Allen Wirfs-Brock wrote: Those are the sort of objects, that we decided to explicitly exclude from spread and for-of. Sure. The question is whether we can compatibly exclude them from sequenceT in

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Allen Wirfs-Brock
On Oct 30, 2013, at 12:09 PM, Anne van Kesteren wrote: On Wed, Oct 30, 2013 at 7:01 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 10/30/13 2:28 PM, Allen Wirfs-Brock wrote: Those are the sort of objects, that we decided to explicitly exclude from spread and for-of. Sure. The question is

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Anne van Kesteren
On Wed, Oct 30, 2013 at 7:23 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: Doesn't really depend upon the usage. If an API is going to return a sequenceT to JS code, it really should have an @@iterator. But that is presumably a non-breaking change, from the JS perspective. If an API

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Allen Wirfs-Brock
On Oct 30, 2013, at 12:29 PM, Anne van Kesteren wrote: On Wed, Oct 30, 2013 at 7:23 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: Doesn't really depend upon the usage. If an API is going to return a sequenceT to JS code, it really should have an @@iterator. But that is presumably a

Re: ES6 draft, Rev20 is now available

2013-10-30 Thread Boris Zbarsky
On 10/30/13 3:23 PM, Allen Wirfs-Brock wrote: If an API is going to return a sequenceT to JS code Then it becomes a JS Array object in JS. So there is no change here. If an API wants to accept a sequenceT it only needs it to have an @@iterator if it is actually going to use JS iterator

ES6 draft, Rev20 is now available

2013-10-29 Thread Allen Wirfs-Brock
At: http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts The HtML version isn't ready yet, but should be available soon. Changes include: Introduced grammar parameters and eliminated NoIn productions Spread now requires an Iterable rather than an array-like B.1.4, Web browser