More string indexing semantics issues

Allen Wirfs-Brock Allen.Wirfs-Brock at microsoft.com
Wed Jun 25 09:37:25 PDT 2008


Garrent: Thanks for the pointer to your analysis. Do you have any others that identify issues that could potentially be fixed in ES3.1?


I think in this case I have to agree with Maciej...Webkit appears to be doing the "right thing" by making a string appear to consistently have a set of numerically named readonly properties that exactly correspond to the elements of the string value.

In a clean-slate world, I think that should be the end of the discussion.  However, we have backwards compatibility issues to consider.  By the book ES3 allows numerically named properties to be added to String objects that are unrelated to the string value, and 2 out of the 3 widely used browser-based implementations that support property style access to the string value also allow such properties to be added.  Only Webkit deviates from this.  Right or wrong, from a pure compatibility perspective preserving that capability would be important **if we think that there is any significant usage of it**.  The fact that Safari seems to be getting away with its implementation without being badgered into conformance suggests that there probably isn't any such significant usage.

So, unless someone has some evidence that it is going to "break the web" I'm going to leave by ES3.1 specification the way it currently is written, which implements the observed behavior of Webkit.

Maciej: I assume you haven't heard of any significant web content being broken by this behavior.
Garrett:  Do you know of anything other than your test case that would be impacted if the standard adopted the Webkit behavior?




More information about the Es4-discuss mailing list