@@isConcatSpreadable

Leon Arnott leonarnott at gmail.com
Wed Jun 3 10:46:17 UTC 2015


This reminds me: I feel like the spec should've added
Array.prototype[Symbol.isConcatSpreadable] (value:true,
configurable:false, writable:false), and eliminated the final
IsArray() test from
[22.1.3.11](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isconcatspreadable).
Would've made the Array#concat() behaviour a little cleaner, in my
opinion.

Unless, perhaps, the point was to leave it open and allow the end-user
to monkey-patch it to false, thus finally "fixing" Array#concat()
after all these years...? Was that the plan?


More information about the es-discuss mailing list