Claude Pache (2014-03-03T11:49:53.000Z)
Le 3 mars 2014 à 10:46, Andy Wingo <wingo at igalia.com> a écrit :

> 
> An iterable is simply an object with a callable @@iterator property.
> Calling @@iterator on an object and getting back a result is the
> sum-total of the iterator structural type -- so yes, this problem is
> solved.

What does exactly the spec think what an iterable is? As far as I can tell, only `Array.from` and `%TypedArray%.from` test for iterability, and until [bug 2486] is resolved, it is hard for us to guess, because there are really more than one possible answer, e.g.: `Symbol.iterator in obj` and `typeof obj[Symbol.iterator] === "function"`. 

Section The Iterable Interface [1] define something more restrictive than `typeof obj[Symbol.iterator] === "function"`` and less testable, given the requirements of the returned value of `obj[Symbol.iterator]()`.

—Claude

[bug 2486] https://bugs.ecmascript.org/show_bug.cgi?id=2486
[1] https://people.mozilla.org/~jorendorff/es6-draft.html#sec-iterable-interface
domenic at domenicdenicola.com (2014-03-06T23:06:11.762Z)
Le 3 mars 2014 à 10:46, Andy Wingo <wingo at igalia.com> a écrit :

> An iterable is simply an object with a callable @@iterator property.
> Calling @@iterator on an object and getting back a result is the
> sum-total of the iterator structural type -- so yes, this problem is
> solved.

What does exactly the spec think what an iterable is? As far as I can tell, only `Array.from` and `%TypedArray%.from` test for iterability, and until [bug 2486][] is resolved, it is hard for us to guess, because there are really more than one possible answer, e.g.: `Symbol.iterator in obj` and `typeof obj[Symbol.iterator] === "function"`. 

Section [The Iterable Interface][1] define something more restrictive than `typeof obj[Symbol.iterator] === "function"` and less testable, given the requirements of the returned value of `obj[Symbol.iterator]()`.

[bug 2486]: https://bugs.ecmascript.org/show_bug.cgi?id=2486
[1]: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-iterable-interface