Array methods applied to strings

Brendan Eich brendan at mozilla.com
Mon May 11 13:54:29 PDT 2009


On May 11, 2009, at 1:26 PM, Mark S. Miller wrote:

> [1] To the extent that we also wish to be compatible with
> browser-specific content, since most browser instances are IE,

Note that right now, as IE8 is pushed via Windows Update and takes  
over IE7's share, Firefox 3 / Gecko 1.9 moves to the front of the  
market share by "user-agent rendering engine" race.

Of course, IE8 does not implement string indexing, so  
Array.prototype.pop.call("abc") returns undefined in IE8. But it does  
not throw.

My position is that if you want higher integrity, use strict mode  
(which means getting a modern browser). Otherwise, compatibility  
trumps marginal integrity through incompatible fail-stop changes.

/be



More information about the es-discuss mailing list