Re: How to correctly spec sequences requiring an iterable

On Nov 15, 2013, at 9:42 AM, Boris Zbarsky wrote:

>> ...
> 
> OK.  And a primitive string, e.g., should not be considered iterable for my purposes, right?
> 

Now, that's an interesting question.

    "thisIsAPrimitiveString"[Symbol.interator]

Returns the value of
     String.prototype[@@iterator]
so arguably a primitive strings should be considered to be an Iteratable

As current spec'ed  GetIterator("primitiveString") does in fact work with primitive strings.  So, any conditional Iterable test also needs to consider a primitive string to be an Iterable. This isn't currently correctly handled in the ES6 spec.  It's a new bug that I will fix.

Allen

Received on Friday, 15 November 2013 17:56:32 UTC