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

Re: ArrayClass should imply @@isConcatSpreadable

From: Andreas Rossberg <rossberg@google.com>
Date: Tue, 29 Oct 2013 10:15:36 +0100
Message-ID: <CADjR9Npwo7d_dY=bxHGnbbcYCScLuBQOxo3ptvjMUf2UqMM86g@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>, es-discuss <es-discuss@mozilla.org>
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?

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

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