I've just added a warning on the corresponding page of the MDN JavaScript Reference [1] (the last bullet of the Description section and the red box at the top of the page), so that this Reference ceases to be guilty of not warning that `with` is future-hostile.
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with —Claude Le 19 juin 2013 à 07:06, Andrea Giammarchi <[email protected]> a écrit : > you should, but only partially! I mean, Ext.js still relying into > `with(whatever)` behavior is as guilty as any decision made in last 5 years > ... no matter the subject ... > > > On Tue, Jun 18, 2013 at 6:50 PM, Brendan Eich <[email protected]> wrote: > I blame 'with'. So, ex-Borland people at Netscape. And so, ultimately, myself. > > /be > > Allen Wirfs-Brock wrote: > 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. > > Allen > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

