Array.prototype.values() compatibility hazard

Allen Wirfs-Brock allen at
Tue Jun 18 17:18:20 PDT 2013

On Jun 18, 2013, at 3:05 PM, Brandon Benvie wrote:

> On 6/18/2013 3:02 PM, Andrea Giammarchi wrote:
>> can you try to hot-fix that via `with(values.values=values)` ?
> That probably works, but it matters little since the hazard is with the existing installed base of sites that use this which would need to be updated. I can't imagine standardizing "whenever an identifier 'values' is found as the subject of a WithStatement, do ...." would fly either.

and this hazard exists for any method name we add to an existing built-in prototype object.  "values" and "keys" and "entries" may be more likely to run into the problem as they are all plausible variable names but any new property name might break some with-users code in this same manner.


More information about the es-discuss mailing list