Domenic Denicola d at domenic.me
Thu Dec 4 14:25:48 PST 2014

When implementing Array.prototype.includes for V8, we realized suddenly that we should probably do the same for typed arrays.

Looking at many of the %TypedArray%.prototype methods, it seems most of them are specified as basically "the same as Array, but with these minor tweaks." E.g.

- https://people.mozilla.org/~jorendorff/es6-draft.html#sec-%typedarray%.prototype.fill
- https://people.mozilla.org/~jorendorff/es6-draft.html#sec-%typedarray%.prototype.findindex
- https://people.mozilla.org/~jorendorff/es6-draft.html#sec-%typedarray%.prototype.foreach

A few though are specified in detail:

- https://people.mozilla.org/~jorendorff/es6-draft.html#sec-%typedarray%.prototype.filter
- https://people.mozilla.org/~jorendorff/es6-draft.html#sec-%typedarray%.prototype.map

I was wondering if anyone knew why, so I can tell which to use as guidance for speccing %TypedArray%.prototype.includes?

As for process issues, I think it would be reasonable to add a supplement to the existing tc39/Array.prototype.includes repo tacking this on? Or would that be bad, and I should start a separate proposal?

More information about the es-discuss mailing list