ArrayBuffer neutering

Allen Wirfs-Brock allen at
Wed May 21 18:07:01 PDT 2014

On May 21, 2014, at 5:51 PM, Jeremy Martin wrote:

> I think it is better to have one legacy method that behaves differently from all the other (new) methods then to  maintain consistency by introducing 20+ new bug farms.
> Is it too late (or too unexpected) for aTypedArray.subarray(aNeuteredObject) to throw in new contexts (i.e., modules, generators, etc.)? Simply for the sake of reducing the footprint of the legacy method/behavior.

The behavior of build-in objects and methods cannot be context sensitive in this manner because object references flow across such contexts but methods are generally unware from what sort of context they are being called from.  That's why strict mode restrictions are source code contextual and not object contextual.

I'm betting that the world doesn't end if subarray starts throw if applied to a typed array with a neutered buffer.  I still try to see if one or more of the browser implementations are willing to try the experiment.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list