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 11:38:25 -0500
Message-ID: <52864E01.5030901@mit.edu>
To: Allen Wirfs-Brock <allen@wirfs-brock.com>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
On 11/15/13 11:26 AM, Allen Wirfs-Brock wrote:
> It is defined in the ES6 spec.  See
> http://people.mozilla.org/~jorendorff/es6-draft.html#sec-common-iteration-interfaces

So if I read this right, this is proposing:

1)  Check that |iterator = GetProperty(obj, @@iterator)| returns a
     callable object.
2)  Check that |obj2 = iterator.call(obj)| returns an object.
3)  Check that GetProperty(obj2, "next") is a function.
4)  ???

Or am I misreading the "Requirements" column in that only the "Value" 
column determines whether something implements the interface?

-Boris
Received on Friday, 15 November 2013 16:38:58 UTC

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