Re: ArrayClass should imply @@isConcatSpreadable

On 28 October 2013 21:20, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> As far as I can tell, the two places in ES5 that test [[Class]] being equal
> to "Array" are Array.isArray() and Array.prototype.concat.
>
> In ES6, the former does some sort of brand check, but the latter calls
> IsConcatSpreadable, which checks for a @@isConcatSpreadable symbol.
>
> It seems to me like we should probably have ArrayClass objects return true
> from the @@isConcatSpreadable symbol.

Honestly, I think we should rather get rid of @@isConcatSpreadable.
It's far too special-cased (extending the object protocol for a single
random method?). Why can't we simply use @@iterator instead?

/Andreas

Received on Tuesday, 29 October 2013 09:16:33 UTC