W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

Re: How to correctly spec sequences requiring an iterable

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 15 Nov 2013 13:12:48 -0500
Message-ID: <52866420.5000003@mit.edu>
To: Domenic Denicola <domenic@domenicdenicola.com>, Allen Wirfs-Brock <allen@wirfs-brock.com>
CC: Jason Orendorff <jason.orendorff@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 11/15/13 12:58 PM, Domenic Denicola wrote:
> Is `for`-`of` supposed to work with strings?

It does in Gecko's current implementation.

And looking at 
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-forin-div-ofexpressionevaluation-abstract-operation 
that's because GetIterator is invoked on the result of ToObject(), so it 
should work per current spec.

> What about `Array.from`?

Again, as currently specced it works, since Array.from invokes ToObject.

-Boris
Received on Friday, 15 November 2013 18:13:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:19 UTC